RpcController class

Constructors

RpcController()

Properties

batchLength int
returns number of types in the batch list
no setter
hashCode int
The hash code for this object.
no setterinherited
isBatching bool
returns true if controller is in batch mode
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sendEvent → Event<RpcObject>
Event object to handle send events
final

Methods

endBatch() → void
only end the batch mode and clear the batch list without sending any thing
error({required int code, required String message, int? requestId, RpcMeta? data}) → void
send error of code and message with optional requestId if error related to request also data if error has any
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notify(String method, [dynamic data]) → void
send notification with method and params
request<T>(String method, [dynamic params]) Future<T>
send request with method and params
response({required int requestId, dynamic data}) → void
send response of requestId and data as a returned value or as an result
sendBatch() → void
send all RpcRequest and RpcResponse in the batch list then clear it and end batch mode
sendBatchObject(RpcBatch batch) → void
send batch object
sendRequestObject<T>(RpcRequest request) Future<T>
send request object and wait for its response of type T
sendResponseObject(RpcResponse response) → void
send response object
sendRpc(RpcObjectType rpc) → void
send any rpc like RpcRequest or RpcResponse
sendRpcObject(RpcObject object) → void
send any rpc object examples RpcRequest, RpcResponse and RpcBatch
startBatch() → void
start batch mode
toString() String
A string representation of this object.
inherited

Operators

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