Пример #1
0
 private static void OnWriteComplete(TransportAsyncCallbackArgs args)
 {
     AsyncIO.AsyncBufferWriter userToken = (AsyncIO.AsyncBufferWriter)args.UserToken;
     if (!userToken.HandleWriteComplete(args) && !args.CompletedSynchronously)
     {
         userToken.Write(args);
     }
 }
Пример #2
0
 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();
 }
Пример #3
0
 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));
 }