开发者

How do I determine the remote endpoint a UDP packet originates from?

开发者 https://www.devze.com 2023-01-10 23:35 出处:网络
The socket is 开发者_高级运维created and bound, then the program receives data with recv(). The question is: How do I now determine from which host + port the packet originates so that I can send data

The socket is 开发者_高级运维created and bound, then the program receives data with recv(). The question is: How do I now determine from which host + port the packet originates so that I can send data back? Note: C and Winsock is used.


Use recvfrom instead, it can return the source port and address

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号