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

            CNativeNetwork.StartSocketServer(port);
            StartWorkerThreadPool();
        }
示例#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");
            }
        }