Socket::Stream - mfichman/jogo GitHub Wiki

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.

@init()

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.

close()

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

peer=(addr Socket::Addr)

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.

@destroy()

No comment

stream=(_arg0 Io::Stream)

No comment

stream?() Io::Stream

No comment

addr?() Socket::Addr

No comment

peer?() Socket::Addr

No comment