ConnectAsync() public method

public ConnectAsync ( System.TimeSpan timeout, TransportAsyncCallbackArgs callbackArgs ) : bool
timeout System.TimeSpan
callbackArgs TransportAsyncCallbackArgs
return bool
コード例 #1
0
            public ConnectAsyncResult(AmqpTransportInitiator initiator, TimeSpan timeout, AsyncCallback callback, object state)
                : base(callback, state)
            {
                TransportAsyncCallbackArgs args = new TransportAsyncCallbackArgs();

                args.CompletedCallback = onConnect;
                args.UserToken         = this;
                if (!initiator.ConnectAsync(timeout, args))
                {
                    OnConnect(args);
                }
            }
コード例 #2
0
            public ConnectAsyncResult(AmqpTransportInitiator initiator, TimeSpan timeout, AsyncCallback callback, object state)
                : base(timeout, callback, state)
            {
                this.initiator = initiator;
                this.args      = new TransportAsyncCallbackArgs();
                this.args.CompletedCallback = onConnect;
                this.args.UserToken         = this;
                this.SetTimer();

                if (!initiator.ConnectAsync(timeout, this.args))
                {
                    OnConnect(this.args);
                }
            }
コード例 #3
0
 public ConnectAsyncResult(AmqpTransportInitiator initiator, TimeSpan timeout, AsyncCallback callback, object state)
     : base(callback, state)
 {
     TransportAsyncCallbackArgs args = new TransportAsyncCallbackArgs();
     args.CompletedCallback = onConnect;
     args.UserToken = this;
     if (!initiator.ConnectAsync(timeout, args))
     {
         OnConnect(args);
     }
 }