nimiqclient.websocket_rpc.NimiqSerializer¶
- class nimiqclient.websocket_rpc.NimiqSerializer(websocket)[source]¶
Bases:
JsonSerializingWebSocketNimiq Serializer for `RpcMessage`s of fastapi_websocket_rpc.
- Parameters:
websocket (SimpleWebSocket) – Web socket as created by the RPC client.
Methods
Closes the underlying websocket.
Receives a message.
Sends a message.
- async close(code=1000)[source]¶
Closes the underlying websocket.
- Parameters:
code (int) – Code to use for closing the websocket.