Definition at line 15 of file broker.py.
◆ __init__()
def zio.flow.broker.Broker.__init__ |
( |
|
self, |
|
|
|
server, |
|
|
|
factory |
|
) |
| |
Create a flow broker.
Parameters
----------
server : zio.Port
An online SERVER port
factory : callable
See below
This broker routes messages between a pair of clients: a
remote client and its handler. It does this by adding a flow
initiation protocol to ZIO flow protocol.
On receipt of a BOT, the broker passes it to the factory which
should return True if the BOT was accepted else None. The
factory call should return as promptly as possible as the
broker blocks.
If factory returns True then it is expected that the factory
has started some other client which contacs the broker with
the BOT. The factory or the new client may modify the BOT as
per flow protorocl but must leave intact the `cid` attribute
placed in the flow object by the broker.
Note that the flow handler protocol does not communicate the
location of the broker's SERVER socket. It is up to handler
implementations to locate the the server.
Definition at line 16 of file broker.py.
◆ poll()
def zio.flow.broker.Broker.poll |
( |
|
self, |
|
|
|
timeout = None |
|
) |
| |
Poll for at most one message from the SERVER port
Raises exceptions.
Definition at line 51 of file broker.py.
◆ stop()
def zio.flow.broker.Broker.stop |
( |
|
self | ) |
|
◆ factory
zio.flow.broker.Broker.factory |
◆ handlers
zio.flow.broker.Broker.handlers |
◆ other
zio.flow.broker.Broker.other |
◆ server
zio.flow.broker.Broker.server |
The documentation for this class was generated from the following file: