[][src]Module runng::socket

Socket basics

Instantiating any of the various "protocols" creates a socket. A socket may be cloned and it will increase the reference count of the underlying nng_socket. Depending on the gurantees of the originating protocol, simultaneous use of the socket may not be safe. When the last reference to the socket is dropped, nng_close() will be called.

Structs

Flags

Flags used with SendSocket and RecvSocket.

NngSocket

Wraps nng_socket. See nng_socket.

SendError
SocketFlags

Flags used with Listen and Dial.

UnsafeSocket

"Unsafe" version of NngSocket. Merely wraps nng_socket and makes no attempt to manage the underlying resources. May be invalid, close unexpectedly, etc.

Traits

Dial

Socket that can connect to ("dial") another Socket.

GetSocket

Type which exposes an NngSocket.

Listen

Socket that can accept connections from ("listen" to) other Sockets.

RecvSocket

Socket that can receive data.

SendSocket

Socket that can send data.

Socket

Type which is an NngSocket.