Skip to content

client

dev_tool.launcher.ipc.client

log = logging.getLogger(__name__) module-attribute

IPCClient

A client for inter-process communication.

This class provides methods for sending commands to an IPC server.

The constructor for the IPCClient class.

Parameters:

  • ipc_port (int) –

    The port number for the IPC server.

  • ipc_host (str, default: '127.0.0.1' ) –

    The host address for the IPC server.

Source code in dev_tool/launcher/ipc/client.py
def __init__(self, ipc_port: int, ipc_host: str = '127.0.0.1') -> None:
    """
    The constructor for the IPCClient class.

    :param ipc_port: The port number for the IPC server.
    :param ipc_host: The host address for the IPC server.
    """

    self.ipc_port = ipc_port
    self.ipc_host = ipc_host

ipc_port = ipc_port instance-attribute

ipc_host = ipc_host instance-attribute

send_shutdown

A method that sends a shutdown command to the IPC server.

Source code in dev_tool/launcher/ipc/client.py
def send_shutdown(self) -> None:
    """A method that sends a shutdown command to the IPC server."""

    command = IPCCommand.SHUTDOWN.encode('utf-8')
    self._send_command(command)