sendNotification method

void sendNotification(
  1. String method, [
  2. Notification? notification
])
inherited

Sends a notification to the peer.

Implementation

void sendNotification(String method, [Notification? notification]) {
  final request = Zone.current[_currentRequestKey];
  if (request is _IncomingRequest && request.cancelled) return;
  if (!_peer.isClosed) _peer.sendNotification(method, notification);
}