nopasaran.controllers.controller.ClientController¶
- class nopasaran.controllers.controller.ClientController(state_machine, variable, root_certificate_file, client_private_certificate_file)¶
Bases:
ControllerController for client-side control channel.
This controller is used to configure and start the control channel for a client.
- __init__(state_machine, variable, root_certificate_file, client_private_certificate_file)¶
Initialize the ClientController.
- Args:
state_machine: The state machine object. variable: The variable object. root_certificate_file (str): The file path to the root certificate file. client_private_certificate_file (str): The file path to the client private certificate file.
Methods
__init__(state_machine, variable, ...)Initialize the ClientController.
configure(dst_ip, dst_port)Configure the client controller.
start()Start the client controller.
stop()Stop the client controller and the associated connection.
- configure(dst_ip, dst_port)¶
Configure the client controller.
- Args:
dst_ip (str): The destination IP address. dst_port (int): The destination port.
- start()¶
Start the client controller.
- Raises:
RuntimeError: If an error occurs while starting the client.
- stop()¶
Stop the client controller and the associated connection.