public NetworkCommandReceiver(SequenceIndex sequenceIndex, INetworkManager networkManager, INetworkMessageHandler networkMessageHandler, INetworkMessageSerializer messageSerializer, ICommandQueue commandQueue) { _sequenceIndex = sequenceIndex; _networkManager = networkManager; _networkMessageHandler = networkMessageHandler; _messageSerializer = messageSerializer; _commandQueue = commandQueue; }
public HallServerNetwork(RoomEventDispatcher dispatcher) { _stopwatch = Stopwatch.StartNew(); _defaultSerializer = _rpcMgr.GetRpcMessageSerializer(); _dispatcher = dispatcher; _dispatcher.Intercept += InterceptRoomEvent; _dispatcher.OnRoomEvent += OnRoomEvent; _client = _clientFactory.CreateTcpNetworkClient(SharedConfig.IsLittleEndian, SharedConfig.MutilThread, "Allocation"); _client.ChannelConnected += ClientOnChannelConnected; _client.ChannelDisconnected += ClientOnChannelDisConnected; RegisterCommand(); }
public NetworkCommandBroadcaster(SequenceIndex sequenceIndex, ICommandQueue commandQueue, INetworkManager networkManager, INetworkMessageHandler networkMessageHandler, INetworkMessageSerializer networkMessageSerializer) { _sequenceIndex = sequenceIndex; _networkManager = networkManager; _networkMessageHandler = networkMessageHandler; _networkMessageSerializer = networkMessageSerializer; _disposable = networkManager.ClientConnected.Subscribe(Observer.Create <int>(HandleClientConnected)); commandQueue.AddListener(this); }