private HubProtocol(ConnectionContext connection, int?maximumMessageSize, IHubProtocol hubProtocol, IInvocationBinder invocationBinder) { _connection = connection; _protocolReader = connection.CreateReader(); _protocolWriter = connection.CreateWriter(); _hubMessageReader = new HubMessageReader(hubProtocol, invocationBinder); _hubMessageWriter = new HubMessageWriter(hubProtocol); _maximumMessageSize = maximumMessageSize; }
public HttpClientProtocol(ConnectionContext connection) { _connection = connection; _reader = connection.CreateReader(); (string host, int port) = connection.RemoteEndPoint switch { UriEndPoint uriEndPoint => (uriEndPoint.Uri.Host, uriEndPoint.Uri.Port), IPEndPoint ip => (ip.Address.ToString(), ip.Port), _ => throw new NotSupportedException($"{connection.RemoteEndPoint} not supported") }; _messageWriter = new Http1RequestMessageWriter(host, port); }
public HttpClientProtocol(ConnectionContext connection) { _connection = connection; _reader = connection.CreateReader(); }
public HttpBodyStream(ProtocolReader reader, IMessageReader <ReadOnlySequence <byte> > bodyReader) { _reader = reader; _bodyReader = bodyReader; }