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(); }
private TransportHandler(AmqpTransportListener parent, TransportAsyncCallbackArgs args) { this.parent = parent; this.args = args; this.args.UserToken = this; this.buffer = new byte[8]; this.bufferReader = new AsyncIO.AsyncBufferReader(args.Transport); this.bufferWriter = new AsyncIO.AsyncBufferWriter(args.Transport); this.timeoutHelper = new TimeoutHelper(TimeSpan.FromSeconds(60)); }
TransportHandler(AmqpTransportListener parent, TransportAsyncCallbackArgs args) { this.parent = parent; this.args = args; this.args.UserToken = this; this.buffer = new byte[AmqpConstants.ProtocolHeaderSize]; this.bufferReader = new AsyncIO.AsyncBufferReader(args.Transport); this.bufferWriter = new AsyncIO.AsyncBufferWriter(args.Transport); this.timeoutHelper = new TimeoutHelper(AmqpConstants.DefaultTimeout); }
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)); }
private void OnConnectComplete(TransportAsyncCallbackArgs args) { if (args.Exception != null) { this.Complete(args); return; } if (this.settings.TransportProviders[this.providerIndex].ProtocolId == ProtocolId.Amqp) { this.Complete(args); return; } this.writer = new AsyncIO.AsyncBufferWriter(args.Transport); this.reader = new AsyncIO.AsyncBufferReader(args.Transport); this.WriteSecurityHeader(args); }
public bool Start() { this.reader = new AsyncIO.FrameBufferReader(this, this.transport); this.writer = new AsyncIO.AsyncBufferWriter(this.transport); if (this.isInitiator) { this.state = SaslNegotiator.SaslState.WaitingForServerMechanisms; MessagingClientEtwProvider.TraceClient <SaslNegotiator>((SaslNegotiator source) => { }, this); this.ReadFrame(); } else { this.SendServerMechanisms(); } return(false); }
public bool Start() { this.reader = new AsyncIO.FrameBufferReader(this, transport, this.provider.MaxFrameSize); this.writer = new AsyncIO.AsyncBufferWriter(transport); if (!this.isInitiator) { this.SendServerMechanisms(); } else { this.state = SaslState.WaitingForServerMechanisms; AmqpTrace.Provider.AmqpLogOperationVerbose(this, TraceOperation.Execute, "WaitingForServerMechanisms"); this.ReadFrame(); } return(false); }
public bool Start() { this.reader = new AsyncIO.FrameBufferReader(transport); this.writer = new AsyncIO.AsyncBufferWriter(transport); if (!this.transport.IsInitiator) { this.SendServerMechanisms(); } else { Utils.Trace(TraceLevel.Info, "{0}: waiting for server mechanisms", this); this.state = SaslState.WaitingForServerMechanisms; this.ReadFrame(); } return false; }
public bool Start() { this.reader = new AsyncIO.FrameBufferReader(transport); this.writer = new AsyncIO.AsyncBufferWriter(transport); if (!this.transport.IsInitiator) { this.SendServerMechanisms(); } else { Utils.Trace(TraceLevel.Info, "{0}: waiting for server mechanisms", this); this.state = SaslState.WaitingForServerMechanisms; this.ReadFrame(); } return(false); }
public bool Start() { this.reader = new AsyncIO.FrameBufferReader(this, transport, this.provider.MaxFrameSize); this.writer = new AsyncIO.AsyncBufferWriter(transport); if (!this.isInitiator) { this.SendServerMechanisms(); } else { this.state = SaslState.WaitingForServerMechanisms; AmqpTrace.Provider.AmqpLogOperationVerbose(this, TraceOperation.Execute, "WaitingForServerMechanisms"); this.ReadFrame(); } return false; }
private void HandleTransportOpened(IAsyncResult result) { TransportAsyncCallbackArgs asyncState = (TransportAsyncCallbackArgs)result.AsyncState; asyncState.Transport.EndOpen(result); AmqpTransportInitiator amqpTransportInitiator = this; amqpTransportInitiator.providerIndex = amqpTransportInitiator.providerIndex + 1; if (this.providerIndex == this.settings.TransportProviders.Count || this.settings.TransportProviders[this.providerIndex].ProtocolId == ProtocolId.Amqp) { this.writer = null; this.reader = null; this.providerIndex = 0; this.Complete(asyncState); return; } this.writer = new AsyncIO.AsyncBufferWriter(asyncState.Transport); this.reader = new AsyncIO.AsyncBufferReader(asyncState.Transport); this.WriteSecurityHeader(asyncState); }
void OnConnectComplete(TransportAsyncCallbackArgs args) { if (args.Exception != null) { this.Complete(args); return; } TransportProvider provider = this.settings.TransportProviders[this.providerIndex]; if (provider.ProtocolId == ProtocolId.Amqp) { this.Complete(args); return; } Utils.Trace(TraceLevel.Info, "{0}: Connected. Start security negotiation...", this); this.writer = new AsyncIO.AsyncBufferWriter(args.Transport); this.reader = new AsyncIO.AsyncBufferReader(args.Transport); this.WriteSecurityHeader(args); }
void HandleTransportOpened(IAsyncResult result) { TransportAsyncCallbackArgs args = (TransportAsyncCallbackArgs)result.AsyncState; args.Transport.EndOpen(result); ++this.providerIndex; if (this.providerIndex == this.settings.TransportProviders.Count || this.settings.TransportProviders[this.providerIndex].ProtocolId == ProtocolId.Amqp) { this.writer = null; this.reader = null; this.providerIndex = 0; this.Complete(args); } else { this.writer = new AsyncIO.AsyncBufferWriter(args.Transport); this.reader = new AsyncIO.AsyncBufferReader(args.Transport); this.WriteSecurityHeader(args); } }
void OnConnectComplete(TransportAsyncCallbackArgs args) { if (args.Exception != null) { this.Complete(args); return; } TransportProvider provider = this.settings.TransportProviders[this.providerIndex]; if (provider.ProtocolId == ProtocolId.Amqp) { this.Complete(args); return; } this.writer = new AsyncIO.AsyncBufferWriter(args.Transport); this.reader = new AsyncIO.AsyncBufferReader(args.Transport); this.WriteSecurityHeader(args); }