CS 4504 Lecture Notes - Lecture 9: Data Stream, Transport Layer Security, Network Socket
Document Summary
In connection-orientated and connectionless the send operations are nonblocking while the receive operations are blocking. To avoid indefinite blocking receiving process may use the setsotimeout method to set a timeout. It is uncommon to employ datagram sockets for connection-oriented communication. The connection provided by this api is rudimentary and typically insufficient for application that require a true connection. Stream-mode sockets are typically more appropriate for connection-oriented communication. Creates a logical connection between this socket and a socket at the remote address and port. Cancels the current connection, if any, from this socket. A connection is made for a socket with a remote socket. It can only exchange data with the remote socket. The connection is unilateral (enforced by one side only). The datagram socket api supports the exchange of discrete units of data. The stream socket api provides a model of data transfer based on the stream- mode i/o.