Example #1
0
        /// <summary>
        /// Start an event loop that accepting incoming connections, and
        /// start a new thread (frame loop) to update world each frame
        /// </summary>
        /// <param name="port"></param>
        public void StartServer(int port)
        {
            //Start to accept incoming client connection on given port
            Networking.StartServer(AcceptClients, port);

            //Start a seperate thread to send data client each frame
            Thread t = new Thread(FrameLoop);

            t.Start();
        }
Example #2
0
        /// <summary>
        /// Start accepting Tcp sockets connections from clients
        /// </summary>
        public void StartServer()
        {
            // This begins an "event loop"
            Networking.StartServer(NewClientConnected, Constant.PortNum);
            string xmlFileString = "..\\..\\..\\Resource\\settings.xml";

            LoadWorldConfig(xmlFileString); // load config from xml file

            Console.WriteLine("GameServer is running");
        }
Example #3
0
 public void startServer()
 {
     Networking.StartServer(FirstContact, 11000);
 }
Example #4
0
 ///Begins loop of accepting new clients
 private void StartServer()
 {
     Networking.StartServer(AcceptNewClients, 11000);
 }
Example #5
0
 /// <summary>
 /// This method starts the tcp connection
 /// </summary>
 public void StartServer()
 {
     // This begins an "event loop"
     Networking.StartServer(HandleHttpConnection, Constant.WebPortNum);
     Console.WriteLine("WebServer is running");
 }
 public TcpListener StartGameServer()
 {
     return(Networking.StartServer(NewClientConnected, 11000));
 }
Example #7
0
 public TcpListener StartServerWebView()
 {
     return(Networking.StartServer(HandleHttpConnection, 80));
 }