de_twin.faces.deapi_server.TwinDeapiServer#

class de_twin.faces.deapi_server.TwinDeapiServer(twin, port=13240, host='127.0.0.1', *, pace=True)[source]#

Bases: object

The deapi protocol on a TCP port (plus the UDP stop listener), for one twin.

Unlike deapi’s initialize_server.main it serves several connections at once (one thread each, commands serialised), binds any host and can be stopped, which is what tests and de-twin serve need.

Parameters:
__init__(twin, port=13240, host='127.0.0.1', *, pace=True)[source]#
Parameters:

Methods

__init__(twin[, port, host, pace])

serve_forever()

start()

stop()

Attributes

port

the socket may be closed by now).

property port: int#

the socket may be closed by now).

Type:

The bound TCP port (cached at start

start()[source]#
Return type:

TwinDeapiServer

serve_forever()[source]#
Return type:

None

stop()[source]#
Return type:

None