(.NET) TcpListener

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

 

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
,