these samples based on binding of fixed port 45454.
sender and receiver connected to each other by knowing fixed port. how about if another receiver will connect from the same computer? the port is already binded. that is. second receiver doesn't receive anything.
Added after 1 18 minutes:
i did it!
ingredients:
m_pUdpSocket = new QUdpSocket(this);
m_pUdpSocket->connectToHost(strHost, nPort);
method write:
QByteArray arrBlock;
QDataStream out(&arrBlock, QIODevice::WriteOnly);
out.setVersion(QDataStream::Qt_4_7);
out << (qint8)0x4C << (qint8)0x4D << (qint8)0x43 << (qint8)0x50 << (qint8)0x00 << (qint8)0x01 << (qint8)0xAA << (qint8)0xBB << (qint8)0x01 << (qint8)0x00 << (qint8)0x00;
m_pUdpSocket->write(arrBlock);
and slotReadyRead reacted by m_pUdpSocket, SIGNAL(readyRead()) has received Server answer on generic socket port.
I watched all exchage in WireShark sniffer.
Bookmarks