public void StartClient(string hostAddress, ushort port) { var client = AbstractFactory.Get <INetworkTypeFactory>().GetNew <ISocketClientFacade>(); SocketFacade = client; client.StartClient(hostAddress, port, this); MessageBus.SetMediator(this); }
public void StartServer(ushort port, int maxPlayers) { var server = AbstractFactory.Get <INetworkTypeFactory>().GetNew <ISocketServerFacade>(); SocketFacade = server; server.StartServer(port, maxPlayers, this); _timeoutBridge.StartWatching(this); EngineProxy.NetworkingEstablished(); MessageBus.SetMediator(this); }