Reusing a port number in a UDP

前端 未结 3 776
臣服心动
臣服心动 2021-01-24 01:39

In ASIO, s it possible to create another socket that has the same source port as another socket?

My UDP server application is calling receive_from using port 3000. It p

3条回答
  •  自闭症患者
    2021-01-24 02:10

    send reply to the same socket (that you received client's request on) instead of creating new one but make sure you don't send to the same socket from both threads simultaneously

提交回复
热议问题