darknuke Posted December 26, 2003 Posted December 26, 2003 How can I find a client's IP connected to my server (using a TCP socket)? Quote This is only a test of the emergency broadcast system This is a product of hysterical mass confusion A ship of fools adrift on the sea of our pollution Rudderless and powerless on the sea of our delusion pennywise - this is only a test
XxBartmanxX Posted December 26, 2003 Posted December 26, 2003 Quote 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. Quote
darknuke Posted December 26, 2003 Author Posted December 26, 2003 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! :) Quote This is only a test of the emergency broadcast system This is a product of hysterical mass confusion A ship of fools adrift on the sea of our pollution Rudderless and powerless on the sea of our delusion pennywise - this is only a test
XxBartmanxX Posted December 26, 2003 Posted December 26, 2003 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 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.