Winsock
is a protocol-independent interface and specific details for using other
protocols, such as IPX, NetBIOS, AppleTalk, ATM. UDP is capable of sending data
to multiple destinations and receiving it from multiple sources.
UDP只要绑定后就能接受。发送时,绑定都不需要,直接使用创建的socket发送就行了。
Another method of receiving
(and sending) data on a connectionless socket is to establish a connection.
Once a connectionless socket is created, you can call connect or WSAConnect
with the SOCKADDR parameter set to the
address of the remote machine to communicate with. No actual connection is
made, however. The socket address passed into a connect function is associated
with the socket so recv and WSARecv can be used instead of recvfrom or WSARecvFrom because
the data's origin is known.