INNER CODE UNIT · Python
OnConnectCallback
permitio/fastapi_websocket_rpc · fastapi_websocket_rpc/rpc_channel.py:112
async def OnConnectCallback(channel):
pass
async def OnDisconnectCallback(channel):
pass
async def OnErrorCallback(channel, err: Exception):
pass
class RpcChannel:
"""
A wire agnostic json-rpc channel protocol for both server and client.
Enable each side to send RPC-requests (calling exposed methods on other side) and receive rpc-responses with the return value
provides a .other property for calling remote methods.