In my program, I send a sequence of bytes to the device ( 68, 1, 0 ). The device responds with a sequence of bytes ( 68, 1, 0 ). All this I see in the program WireShark. But I can not accept the package because bind does not occur with the address 192.168.0.255:1104 . Who can tell how to do this?
P.S. Already clambered all QT assistant, but did not find the answer.
UPDATE new program code (this is a test code, just to deal with working with sockets):
#include "UDP.h" UDP_Manager::UDP_Manager() { QHostAddress address("192.168.0.104"); Udp_Socket = new QUdpSocket(this); bool Is_Bound = Udp_Socket->bind(QHostAddress::Any, 1104); QByteArray Data; Data.resize(3); Data[0] = 68; Data[1] = 1; Data[2] = 0; Udp_Socket->writeDatagram(Data, address, 1004); _sleep(500); char Buf[4]; qint64 i = Udp_Socket->readDatagram(Buf, sizeof(Buf)); } 