[ CCode ( type_id = "jsonrpc_client_get_type ()" ) ] [ Version ( since = "3.26" ) ] publicclassClient : Object
A client for JSON-RPC communication
The Client class provides a convenient API to coordinate with a JSON-RPC server. You can provide the
underlying [[email protected]] to communicate with allowing you to control the negotiation of how you setup your communications channel.
One such method might be to use a [[email protected]] and communicate over stdin and stdout.
Because JSON-RPC allows for out-of-band notifications from the server to the client, it is important that the consumer of this API calls
[[email protected]] or [[email protected]_async] when they no longer need the client. This is because Client
contains an asynchronous read-loop to process incoming messages. Until [[email protected]] or [[email protected]_async] have
been called, this read loop will prevent the object from finalizing (being freed).
It is a programming error to mix synchronous and asynchronous API calls of the Client class.
For synchronous calls, Client will use the thread-default [[email protected]]. If you have special needs
here ensure you've set the context before calling into any Client API.