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;
}