INNER CODE UNIT · Python
__init__
permitio/fastapi_websocket_rpc · fastapi_websocket_rpc/rpc_channel.py:48
def __init__(self, request: RpcRequest):
self._request = request
self._id = request.call_id
# event used to wait for the completion of the request (upon receiving its matching response)
self._event = asyncio.Event()
@property
def request(self):
return self._request
@property
def call_id(self):
return self._id
def set(self):
"""
Signal completion of request with received response
"""