Lumail - The console email client

Lua primitives: bind_socket()

NOTE: Lumail-legacy has been superseded by Lumail 2.x, which has a wholly unified Lua API.

This function will open a unix domain-socket on the named path, and start listening for commands upon it.

Commands are read once for each iteration around the main event-loop which means that while they will not be processed immediately they should be almost instant.

bind_socket( os.getenv( "HOME" ) .. "/.listening.socket" );

If no path is specified the default is used of "~/.lumail.sock".

The lumail distribution contains a helper command, lumailctl, which is used to send commands to the listening socket - although you may also send input via socat as follows:

echo "exit();" | socat - UNIX-CLIENT:~/.lumail.sock


This function has been available since version 0.25.

See Also

See also close_socket.