pelican/server/test/src/TestServer.cpp
/**
 * @details
 * The default protocol is the standard PelicanProtocol, which can be
 * overridden in the constructor.
 */
@details
The default protocol is the standard PelicanProtocol, which can be
overridden in the constructor.
@details The default protocol is the standard PelicanProtocol which can be overridden in the constructor .
TestServer::TestServer(AbstractProtocol* proto,  QObject* parent)
    : QThread(parent), _protoOwner(false), _dataManager(0),
      _proto(proto), _portServer(0)
{
    if(! _proto) {
        _proto = new PelicanProtocol;
        _protoOwner = true;
    }
    start();
    while( ! _portServer ) { msleep(1); }
    while( ! _portServer->isListening() ) { msleep(1); };
}
TestServer :: TestServer ( AbstractProtocol * proto , QObject * parent ) : QThread ( parent ) , _protoOwner ( false ) , _dataManager ( 0 ) , _proto ( proto ) , _portServer ( 0 ) { if ( ! _proto ) { _proto = new PelicanProtocol ; _protoOwner = true ; } start ( ) ; while ( ! _portServer ) { msleep ( 1 ) ; } while ( ! _portServer -> isListening ( ) ) { msleep ( 1 ) ; } ; }
@details
 The default protocol is the standard PelicanProtocol, which can be
 overridden in the constructor.
@details The default protocol is the standard PelicanProtocol which can be overridden in the constructor .
// set up the protocol // wait until we have a server object