Hi,
I nedd to get TCP information of my local machine....not just destination IP/Port but also duration of connection and received sent bytes
I tried this code but since I am new to socket programming ..it doesnt work can someone help ...
Code:IPEndPoint ip = new IPEndPoint(IPAddress.Any, 1112); Socket sock = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); sock.Bind(ip); sock.Listen(2); Socket ou = sock.Accept(); richTextBox1.Text += string.Format("{0}", ou.LocalEndPoint.AddressFamily.ToString()+ou.ReceiveBufferSize.ToString()+ou.SendBufferSize.ToString()); ou.Close();


Reply With Quote
Bookmarks