How do I determine the remote endpoint a UDP packet originates from?
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
精彩评论