public ServerSessionConnectionReader(ServerSessionPreambleConnectionReader.ServerFramingDuplexSessionChannel channel) : base(channel.Connection, channel.rawConnection, channel.offset, channel.size, channel.RemoteSecurity) { this.decoder = channel.decoder; this.contentType = this.decoder.ContentType; this.maxBufferSize = channel.channelListener.MaxBufferSize; this.bufferManager = channel.channelListener.BufferManager; this.messageEncoder = channel.MessageEncoder; this.rawConnection = channel.rawConnection; }
public OpenAsyncResult(ServerSessionPreambleConnectionReader.ServerFramingDuplexSessionChannel channel, TimeSpan timeout, AsyncCallback callback, object state) : base(callback, state) { this.channel = channel; this.timeoutHelper = new TimeoutHelper(timeout); bool flag = false; bool flag2 = false; try { channel.ValidateContentType(ref this.timeoutHelper); flag = this.ContinueReading(); flag2 = true; } finally { if (!flag2) { this.CleanupOnError(); } } if (flag) { base.Complete(true); } }