Send data to Qt application(Laptop) from Android using UDP
问题 In my Qt5 application, I'm trying to implement UDP : port = _M_PORT; socket = new QUdpSocket(this); //socket->bind(QHostAddress("192.168.0.100"),port); socket->bind(QHostAddress("192.168.0.108"),port); connect(socket,SIGNAL(readyRead()),this,SLOT(readyRead())); Also tried : socket = new QUdpSocket(this); socket->connectToHost("192.168.0.108",port); socket->bind(port); IP address of my PC is 192.168.0.108 and IP address of my Android phone is 192.168.0.100 . I'm reading datagrams from UDP like