Client IP connected on TCP

s.Connect(lep);

// Using the LocalEndPoint property.
Console.WriteLine("My local IpAddress is :" + IPAddress.Parse(((IPEndPoint)s.LocalEndPoint).Address.ToString()) +
"I am connected on port number " + ((IPEndPoint)s.LocalEndPoint).Port.ToString());

Straight out of MSDN. I am assuming you are using C#, but regardless of that your answer is in MSDN.
 
I'm using vb; I can never find what I'm looking for on MSDN. I used the top line of the code to search and found the vb version.

Thanks! :)
 
Hmm, it seems to be that way for a lot of people. You just have to think of keywords. In this case, looking up 'Socket' in the index will give you everything that you need. I think that it should be a similar process in VB .NET as in C#. Good luck
 
Back
Top