Communication
Client
-
class Client(id: str, host: str, port: int, ws_handlers: Dict[enum.Enum, Callable] = {}, parent_logger: Optional[logging.Logger] = None)
-
async async_send(signal: enum.Enum, data: Any, ok: bool = False) → bool
-
connect()
-
send(signal: enum.Enum, data: Any, ok: bool = False) → concurrent.futures._base.Future[bool]
-
send_file(sender_id: str, filepath: pathlib.Path) → concurrent.futures._base.Future[bool]
-
send_folder(sender_id: str, dir: pathlib.Path) → concurrent.futures._base.Future[bool]
-
setLogger(parent_logger: logging.Logger)
-
shutdown()
Server
-
class Server(id: str, port: int, host: str = '172.17.0.2', routes: List[aiohttp.web_routedef.RouteDef] = [], ws_handlers: Dict[enum.Enum, Callable] = {}, parent_logger: Optional[logging.Logger] = None)
-
add_routes(routes: List[aiohttp.web_routedef.RouteDef])
-
async async_broadcast(signal: enum.Enum, data: Dict, ok: bool = False) → bool
-
async async_send(client_id: str, signal: enum.Enum, data: Dict, ok: bool = False) → bool
-
async async_shutdown() → bool
-
broadcast(signal: enum.Enum, data: Dict, ok: bool = False) → List[concurrent.futures._base.Future[bool]]
-
move_transfer_files(dst: pathlib.Path, unzip: bool) → bool
-
send(client_id: str, signal: enum.Enum, data: Dict, ok: bool = False) → concurrent.futures._base.Future[bool]
-
serve(thread: Optional[chimerapy.engine.networking.async_loop_thread.AsyncLoopThread] = None)
-
shutdown() → bool
Subscriber
-
class Subscriber(port: int, host: str)
-
receive(check_period: Union[int, float] = 0.1, timeout: Optional[Union[int, float]] = None)
-
receive_loop()
-
shutdown()
-
start()