public AsyncReader(AsyncIO parent, int maxFrameSize, bool readProtocolHeader) { this.asyncIo = parent; this.maxFrameSize = maxFrameSize; this.readProtocolHeader = readProtocolHeader; this.frameSizeBuffer = FrameSizeSegmentPool.TakeBuffer(FixedWidth.UInt); this.readAsyncEventArgs = new TransportAsyncCallbackArgs(); this.readAsyncEventArgs.CompletedCallback = onReadBufferComplete; this.readAsyncEventArgs.UserToken = this; }
protected AmqpConnectionBase(string type, TransportBase transport, AmqpConnectionSettings settings, bool isInitiator) : base(type, transport.Identifier) { if (settings == null) { throw new ArgumentNullException("settings"); } Fx.Assert(transport != null, "transport must not be null."); this.settings = settings; this.asyncIO = new AsyncIO(this, (int)this.settings.MaxFrameSize(), transport, isInitiator); }
protected AmqpConnectionBase(string type, TransportBase transport, AmqpConnectionSettings settings, bool isInitiator) : base(type, transport.Identifier) { if (settings == null) { throw new ArgumentNullException("settings"); } Fx.Assert(transport != null, "transport must not be null."); this.settings = settings; this.asyncIO = new AsyncIO(this, (int)this.settings.MaxFrameSize(), this.settings.WriteBufferFullLimit, this.settings.WriteBufferEmptyLimit, transport, isInitiator); }