public PacketChecker(PacketPadder <TSender> padder, ByteChannelOptions options) { this._maxConcurrency = options.MaximumConcurrency; this._padder = padder; this._padder.Receive += this._padder_Receive; this._registration = this.RegisterSendTimeout(options.WaitTimeout); }
/// <summary> /// Initializes a new instance of the <see cref="ByteChannel{TSender}" /> class. /// </summary> /// <param name="innerChannel">The inner network channel.</param> /// <param name="options">The options.</param> public ByteChannel(INetworkChannel <TSender> innerChannel, ByteChannelOptions options) { this._buffer = new PacketBuffer <TSender>( new PacketChecker <TSender>( new PacketPadder <TSender>(innerChannel), options)); this._buffer.Receive += this._buffer_Receive; this.Reset(); }