关于Socket...

http://www.beej.us/guide/bgnet/output/html/multipage/sendman.html

These functions send data to a socket. Generally speaking, send() is used for TCP SOCK_STREAM connected sockets, and sendto() is used for UDPSOCK_DGRAM unconnected datagram sockets. With the unconnected sockets, you must specify the destination of a packet each time you send one, and that's why the last parameters of sendto() define where the packet is going.

posted @ 2013-03-07 14:57  zysyyz  阅读(83)  评论(0)    收藏  举报