INNER CODE UNIT · Python
OnDisconnectCallback
permitio/fastapi_websocket_rpc · fastapi_websocket_rpc/rpc_channel.py:116
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.
e.g. answer = channel.other.add(a=1,b=1) will (For example) ask the other side to perform 1+1 and will return an RPC-response of 2
"""
def __init__(