Client class

A JSON-RPC 2.0 client.

A client calls methods on a server and handles the server's responses to those method calls. Methods can be called with sendRequest, or with sendNotification if no response is expected.

Implementers

Constructors

Client(StreamChannel<String> channel)
Creates a Client that communicates over channel. [...]
Client.withoutJson(StreamChannel channel)
Creates a Client that communicates using decoded messages over channel. [...]

Properties

done Future
Returns a Future that completes when the underlying connection is closed. [...]
read-only
hashCode int
The hash code for this object. [...]
read-only, inherited
isClosed bool
Whether the underlying connection is closed. [...]
read-only
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

close() Future
Closes the underlying connection. [...]
listen() Future
Starts listening to the underlying stream. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
sendNotification(String method, [dynamic parameters]) → void
Sends a JSON-RPC 2 request to invoke the given method without expecting a response. [...]
sendRequest(String method, [dynamic parameters]) Future
Sends a JSON-RPC 2 request to invoke the given method. [...]
toString() String
Returns a string representation of this object.
inherited
withBatch(dynamic callback()) → void
Runs callback and batches any requests sent until it returns. [...]

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited