private void button1_Click(object sender, EventArgs e) { sck = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); IPEndPoint localEndPoint = new IPEndPoint(IPAddress.Parse("192.168.0.177"), 80); textBox2.Text = localEndPoint.ToString(); try { sck.Connect(localEndPoint); byte[] bytes = new byte[9600]; string o = Encoding.UTF8.GetString(bytes); textBox1.Text = o; sck.Close(); } catch { Console.Write("Unable to Connect \r\n"); textBox1.Text = "error"; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)