class

JsonRpc::DelayedResponse

Inherits Reference / Object

Like Response, but delayed in that you can send a response to a request some time after your Handler#handle_rpc_call has returned.

See Request#respond_later

Constructors

new(id : Int64 | String | Nil, client : JsonRpc::Client)
Source

Instance methods

client

The underlying client

Source
error(code : Int32, message : String, data : JSON::Any | Nil = nil)

Sends an error response.

Source
id

The invocation id to respond to

Source
respond(failure : LocalCallError)

Sends an error response.

Source
respond(result)

Sends a successful response based on result.

Source
send(response : Response)

Sends a response to the backing #client.

Source