public void Send(ReadOnlySpan <byte> message) { if (_configuration.ConflateSendRequestsOnEnqueuing) { _session.Conflater.EnqueueOrMergeSendRequest(message, _sendRequestProcessingEngine); } else { _sendRequestProcessingEngine.RequestSend(_session.Id, message); } }
public void Send(string peerId, ReadOnlySpan <byte> message) { if (!_sessionManager.TryGetSession(peerId, out ISession session)) { return; } if (_configuration.ConflateSendRequestsOnEnqueuing) { session.Conflater.EnqueueOrMergeSendRequest(message, _sendRequestProcessingEngine); } else { _sendRequestProcessingEngine.RequestSend(session.Id, message); } }