Exemplo n.º 1
0
        public AGVTcpServer getAGVTcpServer()
        {
            if (agvTcpServer == null)
            {
                agvTcpServer = new AGVTcpServer();
            }

            return(agvTcpServer);
        }
Exemplo n.º 2
0
        public void ServerService()
        {
            try
            {
                while (true)
                {
                    Console.WriteLine("read to send");
                    AGVTcpServer.Send(client);
                    Thread.Sleep(10000);
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString());
            }

            if (client != null)
            {
                client.Close();
                client = null;
            }
            Console.WriteLine("user duankai");
        }