Ejemplo n.º 1
0
        public IAsyncResult BeginConnect(RelayedConnectMessage request, AsyncCallback callback, object state)
        {
            EventTraceActivity eventTraceActivity = new EventTraceActivity(Guid.Parse(request.Id));

            MessagingClientEtwProvider.Provider.RelayListenerRelayedConnectReceived(eventTraceActivity, string.Concat("WebSocket: ", this.uri.AbsoluteUri), request.Id);
            return((new WebSocketRelayedConnectionListener.ConnectAsyncResult(request, this, eventTraceActivity, callback, state)).Start());
        }
Ejemplo n.º 2
0
        IAsyncResult Microsoft.ServiceBus.IRelayedConnectionControl.BeginConnect(RelayedConnectMessage request, AsyncCallback callback, object state)
        {
            RelayedConnectionSession relayedConnectionSession;
            Guid guid = new Guid(request.Id);
            EventTraceActivity eventTraceActivity  = new EventTraceActivity(guid);
            EventTraceActivity eventTraceActivity1 = new EventTraceActivity();

            MessagingClientEtwProvider.Provider.RelayListenerRelayedConnectReceived(eventTraceActivity, this.uri.AbsoluteUri, request.Id);
            MessagingClientEtwProvider.Provider.RelayChannelConnectionTransfer(eventTraceActivity, eventTraceActivity1);
            lock (this.ThisLock)
            {
                if (this.isClosed)
                {
                    throw Fx.Exception.AsError(new FaultException(SRClient.EndpointNotFoundFault), eventTraceActivity);
                }
                if (this.connectionSessions.ContainsKey(request.Id))
                {
                    throw Fx.Exception.AsError(new FaultException(SRClient.DuplicateConnectionIDFault), eventTraceActivity);
                }
                relayedConnectionSession = new RelayedConnectionSession(this.bufferSize, this.uri, this.tokenProvider, this.socketSecurityMode, guid, this, eventTraceActivity1);
                this.connectionSessions.Add(request.Id, relayedConnectionSession);
            }
            return(relayedConnectionSession.BeginConnect(request, callback, state));
        }
Ejemplo n.º 3
0
 public ConnectAsyncResult(RelayedConnectMessage request, WebSocketRelayedConnectionListener relayedConnectionListener, EventTraceActivity activity, AsyncCallback callback, object state) : base(ConnectConstants.ConnectionInitiateTimeout, callback, state)
 {
     this.Request  = request;
     this.activity = activity;
     this.relayedConnectionListener = relayedConnectionListener;
 }
Ejemplo n.º 4
0
 public IAsyncResult BeginConnect(RelayedConnectMessage request, AsyncCallback callback, object state)
 {
     return((new RelayedConnectionSession.ConnectAsyncResult(request, this, callback, state)).Start());
 }
Ejemplo n.º 5
0
 public ConnectAsyncResult(RelayedConnectMessage request, RelayedConnectionSession relayedConnectionSession, AsyncCallback callback, object state) : base(ConnectConstants.ConnectionInitiateTimeout, callback, state)
 {
     this.request = request;
     this.RelayedConnectionSession = relayedConnectionSession;
 }