/// <summary>Constructs a stream with the given ID.</summary> /// <param name="streamId">The stream ID.</param> /// <param name="socket">The parent socket.</param> protected SocketStream(long streamId, MultiStreamSocket socket) { _socket = socket; _id = streamId; _socket.AddStream(_id, this); IsBidirectional = _id % 4 < 2; }
/// <summary>Constructs a stream with the given ID.</summary> /// <param name="streamId">The stream ID.</param> /// <param name="socket">The parent socket.</param> protected SocketStream(MultiStreamSocket socket, long streamId) { _socket = socket; _id = streamId; IsBidirectional = _id % 4 < 2; IsControl = _id == 2 || _id == 3; _socket.AddStream(_id, this, IsControl); }
protected SignaledSocketStream(MultiStreamSocket socket, long streamId) : base(socket, streamId) => _source.RunContinuationsAsynchronously = true;
/// <summary>Constructs an outgoing stream.</summary> /// <param name="bidirectional">True to create a bidirectional stream, False otherwise.</param> /// <param name="control">True to create a control stream, False otherwise.</param> /// <param name="socket">The parent socket.</param> protected SocketStream(MultiStreamSocket socket, bool bidirectional, bool control) { _socket = socket; IsBidirectional = bidirectional; IsControl = control; }
protected SignaledSocketStream(MultiStreamSocket socket, bool bidirectional, bool control) : base(socket, bidirectional, control) { }
protected SignaledSocketStream(MultiStreamSocket socket, long streamId) : base(socket, streamId) { }
/// <summary>Constructs an outgoing stream.</summary> /// <param name="bidirectional">True to create a bidirectional, False otherwise.</param> /// <param name="socket">The parent socket.</param> protected SocketStream(bool bidirectional, MultiStreamSocket socket) { IsBidirectional = bidirectional; _socket = socket; }
protected SignaledSocketStream(bool bidirectional, MultiStreamSocket socket) : base(bidirectional, socket) { }
protected SignaledSocketStream(long streamId, MultiStreamSocket socket) : base(streamId, socket) { }