Skip to content
Matt Fichman edited this page Dec 20, 2012 · 8 revisions

The Socket::Stream class implements a stream-oriented socket (e.g., TCP). Usually, a stream socket is created using the Socket::stream function, but sockets can also be created directly using the constructor below.

Creates a new socket that is not connected to any remote host. The new socket is not bound to any local port or interface until the 'addr' attribute is set.

Flushes the stream, then gracefully closes the socket by calling 'shutdown' and reading any remaining data from the socket.

Connects this socket to 'addr'. If there is an existing connection, it will be closed before the socket connects to the new remote peer. This function will block the current coroutine until the connection succeeds or fails.

No comment

No comment

No comment

No comment

No comment

Clone this wiki locally