(.NET) TcpListener

C#/Winform 2017. 4. 15. 14:37
728x90
728x170

 

Server

            IPEndPoint localAddress = new IPEndPoint(IPAddress.Parse("192.168.70.5"), 5425);
            TcpListener server = new TcpListener(localAddress);
            server.Start();


Cilent

           IPEndPoint clientAddress = new IPEndPoint(IPAddress.Parse("192.168.70.5"), 0);
           TcpClient client = new TcpClient(clientAddress);
           IPEndPoint serveraddress = new IPEndPoint(IPAddress.Parse("192.168.70.5"), 5425);
           client.Connect(serveraddress); 

          

728x90
그리드형
Posted by kjun.kr
,