We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Zero MQ client.
import logging import zmq from jsonrpcclient import Ok, parse_json, request_json socket = zmq.Context().socket(zmq.REQ) socket.connect("tcp://localhost:5000") socket.send_string(request_json("ping")) response = parse_json(socket.recv().decode()) # Python 3.10+ should use `match` syntax here if isinstance(response, Ok): print(response.result) else: logging.error(response.message)
Reference: JSON-RPC in ZeroMQ.