コード例 #1
0
        private void StartServer()
        {
            if (ServerX.IsRunning)
            {
                ServerX.Stop();
            }

            ServerX.Start();
            Console.WriteLine("Socket server X has been started!");
        }
コード例 #2
0
        public void StopServer()
        {
            if (ServerX.IsRunning)
            {
                ServerX.Stop();
                Console.WriteLine("Socket server X has been stopped!");
            }

            if (ServerY != null && ServerY.IsRunning)
            {
                ServerY.Stop();
                Console.WriteLine("Socket server Y has been stopped!");
            }
        }