Skip to main content

Module socket

Module socket 

Source
Expand description

The workspace’s socket: QCode listens on it while the workspace is open, and the server in every profile container of the workspace asks its questions through it.

A unix socket rather than a port, because a profile without the network has no network to reach a port through, while a socket is a file in a folder the container mounts. One thread waits for connections and one short thread serves each: it reads the question, hands it to the screen through the Inbox and writes back whatever the screen answers. The screen decides everything; this module only carries lines.

Where the system has no unix sockets, Listener::open says so and the workspace has no bridge; nothing else changes.

Structs§

Call
A question that came in, and the way back to the one who asked.
Inbox
Where the screen waits for the next call.
Listener
A workspace’s socket, listened on for as long as this value lives.