rlightning.utils.zmq.communication

rlightning.utils.zmq.communication.create_socket(port: int = 5566) Tuple[MockModule('zmq.Context'), MockModule('zmq.Socket')][source]

Create a socket and return the tuple of context and socket

Parameters:

port (int, optional) – Port number for zmq service. Defaults to 5566.

Returns:

A tuple of context and socket

Return type:

Tuple[zmq.Context, zmq.Socket]

rlightning.utils.zmq.communication.get_free_port() int[source]

Return a free port for socket communication

Returns:

Port number

Return type:

int

rlightning.utils.zmq.communication.get_local_ip() str[source]