A message requestor class.
More...
A message requestor class.
- Note
- : The MsgRequestor may also be used as a context manager to automatically close the connection.
Add close or context manager support to automatically clean up
Allow control of identity prefix.
def rad.services.msg.MsgRequestor.__init__ |
( |
|
self, |
|
|
|
endpoint |
|
) |
| |
Create new requestor.
- Params
- endpoint ZMQ endpoint to connect to. zmq_ctx The ZMQ Context to use. loop The asyncio event loop to use. Default is to use the current event loop. ident_prefix Optional identity prefix.
def rad.services.msg.MsgRequestor.__init__ |
( |
|
self, |
|
|
|
endpoint |
|
) |
| |
Create new requestor.
- Params
- endpoint ZMQ endpoint to connect to. zmq_ctx The ZMQ Context to use. loop The asyncio event loop to use. Default is to use the current event loop. ident_prefix Optional identity prefix.
def rad.services.msg.MsgRequestor.__enter__ |
( |
|
self | ) |
|
Context manager API implementation.
def rad.services.msg.MsgRequestor.__enter__ |
( |
|
self | ) |
|
Context manager API implementation.
def rad.services.msg.MsgRequestor.__exit__ |
( |
|
self, |
|
|
|
exc |
|
) |
| |
Context manager API implementation.
def rad.services.msg.MsgRequestor.__exit__ |
( |
|
self, |
|
|
|
exc |
|
) |
| |
Context manager API implementation.
def rad.services.msg.MsgRequestor.close |
( |
|
self | ) |
|
def rad.services.msg.MsgRequestor.close |
( |
|
self | ) |
|
def rad.services.msg.MsgRequestor.is_closed |
( |
|
self, |
|
|
|
bool |
|
) |
| |
def rad.services.msg.MsgRequestor.is_closed |
( |
|
self, |
|
|
|
bool |
|
) |
| |
def rad.services.msg.MsgRequestor.receive |
( |
|
self, |
|
|
|
msg, |
|
|
|
asyncio, |
|
|
|
Future |
|
) |
| |
Receive a reply.
@note: To abort after a timeout, use `asyncio.wait_for`.
- Params
- msg Protobuf message instance or type, used to fill/deserialize incoming message.
- Returns
- Future that resolves to the parsed message.
def rad.services.msg.MsgRequestor.receive |
( |
|
self, |
|
|
|
msg, |
|
|
|
asyncio, |
|
|
|
Future |
|
) |
| |
Receive a reply.
@note: To abort after a timeout, use `asyncio.wait_for`.
- Params
- msg Protobuf message instance or type, used to fill/deserialize incoming message.
- Returns
- Future that resolves to the parsed message.
def rad.services.msg.MsgRequestor.send |
( |
|
self, |
|
|
|
msg, |
|
|
|
asyncio, |
|
|
|
Future |
|
) |
| |
Send msg to server.
- Params
- msg Protobuf message.
- Returns
- Future that resolves when sending is complete.
def rad.services.msg.MsgRequestor.send |
( |
|
self, |
|
|
|
msg, |
|
|
|
asyncio, |
|
|
|
Future |
|
) |
| |
Send msg to server.
- Params
- msg Protobuf message.
- Returns
- Future that resolves when sending is complete.
The documentation for this class was generated from the following files:
- INTROOT/lib/python3.5/site-packages/rad/services/msg.py
- tools/rad/py/rad/src/rad/services/msg.py