pelican/examples/reference/src/ChunkerExample.cpp
// Creates a suitable device ready for reading.
Creates a suitable device ready for reading.
Creates a suitable device ready for reading .
QIODevice* ChunkerExample::newDevice()
{
    QUdpSocket* socket = new QUdpSocket;
    socket->bind(QHostAddress(host()), port());
    while (socket->state() != QUdpSocket::BoundState) {}
    return socket;
}
QIODevice * ChunkerExample :: newDevice ( ) { QUdpSocket * socket = new QUdpSocket ; socket -> bind ( QHostAddress ( host ( ) ) , port ( ) ) ; while ( socket -> state ( ) != QUdpSocket :: BoundState ) { } return socket ; }
Creates a suitable device ready for reading.
Creates a suitable device ready for reading .
// Return an opened QUdpSocket. // Wait for the socket to bind.