nopasaran.controllers.controller.ServerController¶
- class nopasaran.controllers.controller.ServerController(state_machine, variable, root_certificate_file, server_private_certificate_file)¶
Bases:
ControllerController for server-side control channel.
This controller is used to configure and start the control channel for a server.
- __init__(state_machine, variable, root_certificate_file, server_private_certificate_file)¶
Initialize the ServerController.
- Args:
state_machine: The state machine object. variable: The variable object. root_certificate_file (str): The file path to the root certificate file. server_private_certificate_file (str): The file path to the server private certificate file.
Methods
__init__(state_machine, variable, ...)Initialize the ServerController.
configure(src_port)Configure the server controller.
start()Start the server controller.
stop()Stop the server controller and the associated listener.
- configure(src_port)¶
Configure the server controller.
- Args:
src_port (int): The source port.
- start()¶
Start the server controller.
- Raises:
RuntimeError: If an error occurs while starting the server.
- stop()¶
Stop the server controller and the associated listener.