public void Add(ClientTransport transport)
 {
     if (transport != null)
     {
         _transports[transport.Name] = transport;
         _allowed.Add(transport.Name);
     }
 }
Ejemplo n.º 2
0
 public void Add(ClientTransport transport)
 {
     if (transport != null)
     {
         _transports[transport.Name] = transport;
         _allowed.Add(transport.Name);
     }
 }
        public IList <ClientTransport> Negotiate(IList <Object> requestedTransports, String bayeuxVersion)
        {
            List <ClientTransport> list = new List <ClientTransport>();

            foreach (String transportName in _allowed)
            {
                foreach (Object requestedTransportName in requestedTransports)
                {
                    if (requestedTransportName.Equals(transportName))
                    {
                        ClientTransport transport = getTransport(transportName);
                        if (transport.accept(bayeuxVersion))
                        {
                            list.Add(transport);
                        }
                    }
                }
            }
            return(list);
        }
Ejemplo n.º 4
0
 public BayeuxClientState(BayeuxClient bayeuxClient, State type, IDictionary<String, Object> handshakeFields,
         IDictionary<String, Object> advice, ClientTransport transport, String clientId, long backoff)
 {
     this.bayeuxClient = bayeuxClient;
     this.type = type;
     this.handshakeFields = handshakeFields;
     this.advice = advice;
     this.transport = transport;
     this.clientId = clientId;
     this.backoff = backoff;
 }
Ejemplo n.º 5
0
 public DisconnectingState(BayeuxClient bayeuxClient, ClientTransport transport, String clientId)
     : base(bayeuxClient, State.DISCONNECTING, null, null, transport, clientId, 0)
 {
 }
Ejemplo n.º 6
0
 public UnconnectedState(BayeuxClient bayeuxClient, IDictionary<String, Object> handshakeFields, IDictionary<String, Object> advice, ClientTransport transport, String clientId, long backoff)
     : base(bayeuxClient, State.UNCONNECTED, handshakeFields, advice, transport, clientId, backoff)
 {
 }
Ejemplo n.º 7
0
 public ConnectedState(BayeuxClient bayeuxClient, IDictionary<String, Object> handshakeFields, IDictionary<String, Object> advice, ClientTransport transport, String clientId)
     : base(bayeuxClient, State.CONNECTED, handshakeFields, advice, transport, clientId, 0)
 {
 }
Ejemplo n.º 8
0
 public RehandshakingState(BayeuxClient bayeuxClient, IDictionary<String, Object> handshakeFields, ClientTransport transport, long backoff)
     : base(bayeuxClient, State.REHANDSHAKING, handshakeFields, null, transport, null, backoff)
 {
 }
Ejemplo n.º 9
0
 public HandshakingState(BayeuxClient bayeuxClient, IDictionary<String, Object> handshakeFields, ClientTransport transport)
     : base(bayeuxClient, State.HANDSHAKING, handshakeFields, null, transport, null, 0)
 {
 }
Ejemplo n.º 10
0
 public AbortedState(BayeuxClient bayeuxClient, ClientTransport transport)
     : base(bayeuxClient, transport)
 {
 }
Ejemplo n.º 11
0
 public DisconnectedState(BayeuxClient bayeuxClient, ClientTransport transport)
     : base(bayeuxClient, State.DISCONNECTED, null, null, transport, null, 0)
 {
 }