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