Ejemplo n.º 1
0
        private static void TestServer(object var)
        {
            int port = 9000;
            GetacSwrdcIpcApiClass ipc_api = new GetacSwrdcIpcApiClass {
            };

            NetworkStream stream = ipc_api.ApiTcpServer(port);

            if (stream == null)
            {
                return;
            }

            ipc_api.ApiTcpReceiveData(stream);
        }
Ejemplo n.º 2
0
        static void TestClient(object var)
        {
            string ip_addr = "127.0.0.1";
            int    port    = 9000;
            GetacSwrdcIpcApiClass ipc_api = new GetacSwrdcIpcApiClass {
            };

            NetworkStream stream = ipc_api.ApiTcpClient(ip_addr, port);

            if (stream == null)
            {
                GetacSwrdcUtilClass.DebugIt("TestClient", "***** null stream");
                return;
            }

            Thread.Sleep(3000);
            ipc_api.ApiTcpTransmitData(stream, "hellp from phwang");
        }