Liking cljdoc? Tell your friends :D

copilot.json-rpc

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.
raw docstring

create-clientclj

(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.
sourceraw docstring

create-tcp-clientclj

(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>}.
sourceraw docstring

IJsonRpcClientcljprotocol

Protocol for a JSON-RPC 2.0 client.

Protocol for a JSON-RPC 2.0 client.

notify!clj

(notify! this method params)

Send a notification (no response expected).

Send a notification (no response expected).

request!clj

(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!clj

(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!clj

(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!clj

(start! this)

Start the background reader loop.

Start the background reader loop.

stop!clj

(stop! this)

Stop the reader loop and clean up.

Stop the reader loop and clean up.
sourceraw docstring

null-resultclj

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).
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close