BaseClient class

The BaseClient class must be given an open channel to the server, which it will use to make requests (or close the channel). We intentionally keep the channel generic so that we can, for example, inject a mock server and write tests against it. Normally, the channel will be derived from a SecureSocket via TCP (see connect.dart).

Example: var client = BaseClient(await connect('testnet.rvn.rocks'));

Implementers

Constructors

BaseClient(StreamChannel channel, {ErrorCallback? onUnhandledError})

Properties

hashCode int
The hash code for this object.
no setterinherited
peer ↔ Peer
We use a Peer here--which implements both Server and Client sides of a Remote Procedure Call (RPC) interface--to communicate with an ElectrumX Ravencoin server. We do so because we need:
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

close() Future<void>
handleError(dynamic error, dynamic trace) → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
request(String method, [dynamic parameters]) Future
toString() String
A string representation of this object.
inherited

Operators

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