We're a community of 1.1M IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,080,453 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Get client ip address

Hi, i have csharp server(console application) and java client. I need to get a java client ipaddress, can someone tell me what is the function in csharp? I am new in csharp. I was searching on web and nothing help me.

3
Contributors
2
Replies
3 Hours
Discussion Span
6 Months Ago
Last Updated
3
Views
kubiak
Newbie Poster
18 posts since Jan 2011
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

you could always call netstat. that'll give you the ip of every machine connected to yours, and also the stat of that connection.

tinstaafl
Nearly a Posting Virtuoso
1,470 posts since Jun 2010
Reputation Points: 429
Solved Threads: 262
Skill Endorsements: 14

You can obtain the client IP address with the following call:

string clientConnection = ((IPEndPoint)tcpClient.Client.RemoteEndPoint).Address.ToString();

where tcpClient is your TCPClient object.

darkagn
Nearly a Posting Virtuoso
1,223 posts since Aug 2007
Reputation Points: 404
Solved Threads: 212
Skill Endorsements: 15

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page generated in 0.0571 seconds using 2.67MB