QUdpSocket: Cannot receive datagram

前端 未结 2 1506
清酒与你
清酒与你 2020-12-19 21:02

I am using QUdpSocket in order to receive data from a server. When i receive data With SFML its working, i can receive data throught SocketUdp but with qt it doesn\'t work.<

2条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-19 21:36

    I would make the connect before the bind. It's possible that after binding, the readyRead fires before the connect call is completed. If you don't empty the pending datagrams, the readyRead will not fire again.

提交回复
热议问题