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