The information in this article applies to:
SUMMARY
When a UDP message is received by a Winsock control, the RemoteHostIP
property is set to the IP address of the remote machine, and the RemotePort
property is set to the IP port of the remote UDP application. The previous
properties values are overwritten.
MORE INFORMATIONThis is by design. At the Winsock layer, the sendto API requires a sockaddr structure of the remote UDP peer to send the message to, and the recvfrom API always gets a sockaddr structure for the remote UDP peer. The Winsock control internally uses the same sockaddr structure in both sendto and recvfrom API. As UDP is a connectionless protocol, it is possible that one UDP peer could receive a UDP message from a third machine unexpectedly. Therefore, it is important to reset the RemoteHostIP and RemotePort properties to your own known values before calling the SendData method. Additional query words:
kbVBp500 kbCtrl kbNetGrp kbNetwork kbWinsock kbNTOS400 kbWinOS95 kbWinOS98
Keywords : kbGrpVB |
Last Reviewed: January 5, 2000 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |