Exemple #1
0
        public GlobalManager()
        {
            if (Instance == null)
            {
                Instance = this;
            }
            else
            {
                return;
            }

            Console.WriteLine("Getting configuration...");
            Config = Config.Parse();
            Console.WriteLine("Configuration loaded");

            DBClient = new DatabaseClient(Config.DatabaseURI);

            Server = new TCPServer(Config.IP, Config.Port);

            LobbyManager = new LobbyManager();

            ClientMessageHandler = new ClientMessageHandler();
        }
 public ClientServer(int iD)
 {
     ID  = iD;
     tCP = new TCPServer(iD);
     uDP = new UDPServer(iD);
 }
Exemple #3
0
 public GameServerRunner(TCPServer server)
 {
     server.onClient += this.handleClient;
 }
 private void startThreadTCP()
 {
     tcpserver = new TCPServer();
     threadTCP = new Thread(tcpserver.StartTcpServer);
     threadTCP.Start();
 }