Skip to main content

Module endpoint

Module endpoint 

Source
Expand description

Where the front door is, and who is allowed through it. Concept 8: where no instance is running, the invocation starts one and hands over; where one is, it hands over and exits.

The endpoint is restricted to its owner by the directory it sits in, which is the platform’s own mechanism and, §8 says, a requirement rather than a hardening measure. A socket’s own permission bits are not portable — some kernels ignore them on connect — so the guarantee is the traversal bit on a directory nobody else can enter, set before the socket is bound.

It is runtime state and not saved state, which is the opposite of the choice §6.4 made for sessions. A stale socket from a crashed instance is debris to be cleared, where a stale session directory holds somebody’s edit; so this goes in $XDG_RUNTIME_DIR where a platform offers one — cleared at logout, which is exactly right for this and exactly wrong for a session.

Structs§

Listener
The bound endpoint. Unlinks the socket when it goes.

Functions§

bind
Become the instance.
connect
Speak to the instance already running, if there is one.
path
Where this user’s endpoint lives.
prepare
Make the endpoint’s directory, private to its owner.

Type Aliases§

Incoming
Connections as they arrive.
Stream
One connection.