Exemple #1
0
 private static void OnReadComplete(TransportAsyncCallbackArgs args)
 {
     AsyncIO.AsyncBufferReader userToken = (AsyncIO.AsyncBufferReader)args.UserToken;
     if (!userToken.HandleReadComplete(args) && !args.CompletedSynchronously)
     {
         userToken.Read(args);
     }
 }
 void HandleTransportOpened(IAsyncResult result)
 {
     this.args.Transport.EndOpen(result);
     this.bufferReader = new AsyncIO.AsyncBufferReader(this.args.Transport);
     this.bufferWriter = new AsyncIO.AsyncBufferWriter(this.args.Transport);
     this.ReadProtocolHeader();
 }
 TransportHandler(AmqpTransportListener parent, TransportAsyncCallbackArgs args)
 {
     this.parent = parent;
     this.args = args;
     this.buffer = new byte[ProtocolHeader.Size];
     this.bufferReader = new AsyncIO.AsyncBufferReader(args.Transport);
     this.bufferWriter = new AsyncIO.AsyncBufferWriter(args.Transport);
     this.readCompleteCallback = this.OnReadHeaderComplete;
     this.writeCompleteCallback = this.OnWriteHeaderComplete;
     this.timeoutHelper = new TimeoutHelper(TimeSpan.FromSeconds(AmqpConstants.DefaultTimeout));
 }