class documentation

class Client: (source)

View In Hierarchy

Undocumented

Method __post_init__ Undocumented
Method add_event_listener Adds an event listener callback for the provided event name. Events sent from client and from the server connection will be dispatched to the listener
Method close Close the client connection
Method open Open the client connection
Method remove_event_listener Removes an event listener callback for the provided event name if it has been registered
Method send_event Sends an event to the server
Class Variable address Undocumented
Class Variable auto Undocumented
Class Variable port Undocumented
Class Variable remote Undocumented
Class Variable start_time Undocumented
Property is_open Whether the client is connected
Property origin The origin of the server
Method _dispatch_event Undocumented
Method _post_event Undocumented
Instance Variable _closed Undocumented
Instance Variable _connected Undocumented
Instance Variable _listeners Undocumented
Instance Variable _subscription Undocumented
Instance Variable _thread Undocumented
def __post_init__(self): (source)

Undocumented

def add_event_listener(self, event_name: str, listener: t.Callable): (source)

Adds an event listener callback for the provided event name. Events sent from client and from the server connection will be dispatched to the listener

Parameters
event_name:strthe event name
listener:t.Callablethe listener callback
def close(self): (source)

Close the client connection

def open(self, state: fos.StateDescription): (source)

Open the client connection

Arg:
state: the initial state description
def remove_event_listener(self, event_name: str, listener: t.Callable): (source)

Removes an event listener callback for the provided event name if it has been registered

Parameters
event_name:strthe event name
listener:t.Callablethe listener callback
def send_event(self, event: EventType): (source)

Sends an event to the server

Parameters
event:EventTypethe event

Undocumented

Undocumented

Undocumented

Undocumented

start_time: float = (source)

Undocumented

Whether the client is connected

The origin of the server

def _dispatch_event(self, event: EventType): (source)

Undocumented

def _post_event(self, event: Event): (source)

Undocumented

Undocumented

_connected: bool = (source)

Undocumented

Undocumented

_subscription = (source)

Undocumented

Undocumented