Exemplo n.º 1
0
        public void StartListening(IMessagingRoot root)
        {
            _sockets = new WebSocketCollection(root.Workers);

            foreach (var messageType in _handlers.Chains.Select(x => x.MessageType).Where(x => x.CanBeCastTo <ClientMessage>()))
            {
                JsonSerialization.RegisterType(messageType.ToMessageTypeName(), messageType);
            }
        }
Exemplo n.º 2
0
        public void StartListening(BusSettings settings, IWorkerQueue workers)
        {
            _sockets = new WebSocketCollection(workers);

            foreach (var messageType in _handlers.Chains.Select(x => x.MessageType).Where(x => x.CanBeCastTo <ClientMessage>()))
            {
                JsonSerialization.RegisterType(messageType.ToMessageAlias(), messageType);
            }
        }
Exemplo n.º 3
0
 public WebSocketSendingAgent(WebSocketCollection sockets)
 {
     _sockets = sockets;
 }
Exemplo n.º 4
0
 public WebSocketTransport(HandlerGraph handlers, IWorkerQueue workerQueue)
 {
     _handlers = handlers;
     _sockets  = new WebSocketCollection(workerQueue);
 }