Socket

class dsviper.Socket

Bases: object

A class used to represent a shared memory region.

Note: Not directly instantiable.

close() None

Release the socket.

A passive local socket is a file on disk, and deallocation only happens when the last reference goes away, which a host cannot always predict. A host that abandons a socket – a failed bind, a reconfiguration, a shutdown – says so with this. Idempotent.

static create_passive_inet(host: str, service: str) Socket

Create an inet passive socket.

static create_passive_local(socket_path: str) Socket

Create a local passive socket.

is_closed() bool

Return True once the socket has been released.