rejectSession method

dynamic rejectSession({
  1. String message = "Session rejected",
})

Implementation

rejectSession({String message = "Session rejected"}) {
  if (_handshakeId <= 0) {
    throw HandshakeException();
  }

  final response = JsonRpcErrorResponse(
    id: _handshakeId,
    error: JsonRpcError.serverError(message),
  );
  _encryptAndSend(jsonEncode(response.toJson()));
}