stream& datagram socket

A stream socket -- provides two-way, sequenced, reliable, and unduplicated flow of data with no record boundaries. A stream operates much like a telephone conversation. The socket type is SOCK_STREAM, which, in the Internet domain, uses Transmission Control Protocol (TCP).

A datagram socket -- supports a two-way flow of messages. A on a datagram socket may receive messages in a different order from the sequence in which the messages were sent. Record boundaries in the data are preserved. Datagram sockets operate much like passing letters back and forth in the mail. The socket type is SOCK_DGRAM, which, in the Internet domain, uses User Datagram Protocol (UDP).


a stream socket  provides two way,sequenced ,reliable,and unduplicated flow of data with no record boundaries.
passing letter back and forth in the email

posted @ 2017-11-29 21:52  elseliving的记录  阅读(218)  评论(0编辑  收藏  举报