JsonRpcWebsocketClient<R> constructor
JsonRpcWebsocketClient<R> (
- Uri uri, {
- Duration? timeLimit,
- int? maxAttempts,
- List<
int> ? backoffSchedule, - List<
String> ? protocols, - JsonRpcWebsocketClientOnConnect<
R> ? onConnect, - JsonRpcWebsocketClientOnDisconnect? onDisconnect,
- JsonRpcWebsocketClientOnData<
R> ? onData, - JsonRpcWebsocketClientOnError? onError,
- JsonRpcWebsocketClientOnPing<
R> ? onPing, - required JsonRpcWebsocketClientIsPing<
R> isPing, - JsonRpcClientEncoder? encoder,
- required JsonRpcClientDecoder<
R> decoder,
Creates a JSON RPC Client for Websocket methods.
Implementation
JsonRpcWebsocketClient(
super.uri, {
super.timeLimit,
final int? maxAttempts,
final List<int>? backoffSchedule,
this.protocols,
this.onConnect,
this.onDisconnect,
this.onData,
this.onError,
this.onPing,
required this.isPing,
final JsonRpcClientEncoder? encoder,
required super.decoder,
}) : maxAttempts = maxAttempts ?? 1,
backoffSchedule = backoffSchedule ?? const [],
super(encoder: encoder ?? const JsonToBytesEncoder());