pelican/server/test/src/TestUdpChunker.cpp
/**
 * @details
 * Constructs a new TestUdpChunker.
 */
@details
Constructs a new TestUdpChunker.
@details Constructs a new TestUdpChunker .
TestUdpChunker::TestUdpChunker(const ConfigNode& config)
    : AbstractChunker(config), _bytesRead(0), _chunkCounter(0)
{
    if (config.type() != "TestUdpChunker")
        throw QString("TestUdpChunker: Wrong configuration node.");
    _chunkSize = config.getOption("data", "chunkSize").toInt();
    if (chunkTypes().empty())
        throw QString("TestUdpChunker: No chunk types registered to the chunker.");
    if (_chunkSize == 0)
        throw QString("TestUdpChunker: Chunk size zero.");
}
TestUdpChunker :: TestUdpChunker ( const ConfigNode & config ) : AbstractChunker ( config ) , _bytesRead ( 0 ) , _chunkCounter ( 0 ) { if ( config . type ( ) != " " ) throw QString ( " " ) ; _chunkSize = config . getOption ( " " , " " ) . toInt ( ) ; if ( chunkTypes ( ) . empty ( ) ) throw QString ( " " ) ; if ( _chunkSize == 0 ) throw QString ( " " ) ; }
@details
 Constructs a new TestUdpChunker.
@details Constructs a new TestUdpChunker .
// Check configuration node is correct. // Get configuration options. // Some sanity checking.