class Obsctl::IPC::UnixServer

Overview

Unix domain socket server for the local obsctl daemon IPC endpoint.

Defined in:

obsctl/ipc/unix_server.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(socket_path : String = SocketPath.resolve, codec : Codec = Codec.new) #

Creates a server that will bind the configured socket path on listen.


[View source]

Instance Method Detail

def accept : ClientSession #

Accepts one client session from the bound server socket.


[View source]
def bind : Nil #

Creates the socket, removing stale socket files when no server responds.


[View source]
def close : Nil #

Closes the server socket and removes the socket path.


[View source]
def listen(handler : Handler) : Nil #

Binds the socket and handles accepted sessions until closed.


[View source]
def socket_path : String #

[View source]