Esempio n. 1
0
 public static void StartTrinityServer(UInt16 port)
 {
     if (CNativeNetwork.StartSocketServer(port) == -1)
     {
         throw new System.Net.Sockets.SocketException();
     }
 }
Esempio n. 2
0
        public static void StartTrinityServer(UInt16 port)
        {
            // config thread pool
            int cpu_core_count = Environment.ProcessorCount;

            CNativeNetwork.StartSocketServer(port);
            StartWorkerThreadPool();
        }
Esempio n. 3
0
        public static void StartTrinityServer(UInt16 port)
        {
            if (CNativeNetwork.StartSocketServer(port) == -1)
            {
                throw new System.Net.Sockets.SocketException();
            }

            if (!CNativeNetwork.StartWorkerThreadPool())
            {
                throw new Exception("Cannot start worker thread pool");
            }
        }