Exemplo n.º 1
0
        private bool StopTCPServer()
        {
            if (server != null)
            {
                if (connectFlag && serverPort != 0)
                {
                    cmd.SendUnRegistTCP(serverPort);
                    connectFlag = false;
                }
                StopFlag = true;
                server.Stop();

                server = null;
            }
            return(true);
        }