예제 #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);
            }
        }
예제 #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);
            }
        }
예제 #3
0
 public WebSocketSendingAgent(WebSocketCollection sockets)
 {
     _sockets = sockets;
 }
예제 #4
0
 public WebSocketTransport(HandlerGraph handlers, IWorkerQueue workerQueue)
 {
     _handlers = handlers;
     _sockets  = new WebSocketCollection(workerQueue);
 }