Reference: Sockets

General

The name of the socket layer is a little misleading, as it also covers interprocess pipes. It is a generalized IPC/RPC stream API, with user-space buffering which lets you avoid blocking (through look-ahead). Together with the communications layer and proxies, this does a lot of the work (modelling and typing) required to make a network client/server.

Properties overview

Non-blocking operation

To do non-blocking reads/writes with a SOCK, you have to register it with a PROXY and use buffering operations. The actual transfer functions documented here are for simple programs that can afford to block, or threaded implementations. It is up to the application programmer to make sure he doesn't write more than the buffer can hold, or read more than the buffer can provide, at a time. The functions sock_get_max_read and sock_get_max_write are intended for this.

Allocation

Status information

Connectivity

Stream monitoring

Data; writing

Data; reading

Addresses