public static void StartTrinityServer(UInt16 port) { if (CNativeNetwork.StartSocketServer(port) == -1) { throw new System.Net.Sockets.SocketException(); } }
public static void StartTrinityServer(UInt16 port) { // config thread pool int cpu_core_count = Environment.ProcessorCount; CNativeNetwork.StartSocketServer(port); StartWorkerThreadPool(); }
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"); } }