Exemplo n.º 1
0
 /// <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;
 }
Exemplo n.º 2
0
        /// <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);
        }