JSON-RPC 2.0 client with Content-Length framing over stdio or TCP streams.
JSON-RPC 2.0 client with Content-Length framing over stdio or TCP streams.
(create-client in-stream out-stream)Create a new JSON-RPC client from an input stream and output stream.
Call (start! client) to begin reading.
Create a new JSON-RPC client from an input stream and output stream. Call `(start! client)` to begin reading.
(create-tcp-client host port)Create a JSON-RPC client connected to a TCP server at host:port. Returns {:client <JsonRpcClient> :socket <Socket>}.
Create a JSON-RPC client connected to a TCP server at host:port.
Returns {:client <JsonRpcClient> :socket <Socket>}.Protocol for a JSON-RPC 2.0 client.
Protocol for a JSON-RPC 2.0 client.
(notify! this method params)Send a notification (no response expected).
Send a notification (no response expected).
(request! this method params)(request! this method params timeout-ms)Send a request and return a promise that will be delivered with the result.
Send a request and return a promise that will be delivered with the result.
(set-notification-handler! this handler)Set a function (fn [method params]) for server-sent notifications.
Set a function (fn [method params]) for server-sent notifications.
(set-request-handler! this method handler)Register a handler (fn [params] -> result-map) for server-sent requests.
Register a handler (fn [params] -> result-map) for server-sent requests.
(start! this)Start the background reader loop.
Start the background reader loop.
(stop! this)Stop the reader loop and clean up.
Stop the reader loop and clean up.
Return this from a request handler to reply with a JSON null result
(a handler returning nil replies with an empty object).
Return this from a request handler to reply with a JSON `null` result (a handler returning nil replies with an empty object).
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |