send method

  1. @override
Future<void> send({
  1. required JsonRpcPayload payload,
  2. dynamic context,
})
override

Implementation

@override
Future<void> send({required JsonRpcPayload payload, dynamic context}) async {
  socket ??= await _register();
  try {
    socket!.sink.add(jsonEncode(payload.toJson()));
  } catch (e) {
    _onError(id: payload.id, e: e);
  }
}