Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-05-2009, 02:02 AM
Member
 
Join Date: Oct 2009
Posts: 9
Rep Power: 0
Ozmosis is on a distinguished road
Default get client ip
i need to get the client IP n a socket connection. I need the IP alone with the port number (not using getRemoteAdress()).

help s much appreciated
Bookmark Post in Technorati
Reply With Quote
  #2 (permalink)  
Old 11-05-2009, 02:31 AM
mrmatt1111's Avatar
Senior Member
 
Join Date: Aug 2009
Location: San Jose, CA, USA
Posts: 295
Rep Power: 1
mrmatt1111 is on a distinguished road
Default
Why not use getInetAddress() or the like?
__________________
My Hobby Project: LegacyClone
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 11-05-2009, 04:59 AM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 7,504
Rep Power: 11
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
Default
In ServletRequest I'm using following, able collect lots of details.

getRemoteAddr()
getRemoteHost()
getRemotePort()

Client can be end client or the proxy.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
Someone helped you? their helpful post.
Help:Forums FAQ|How To Ask Questions The Smart WayResources:The Java Tutorials|Glossary for Java|NetBeans IDE|Sun DownloadsWeb:WritOnceTips:Is your IDE the best?|Which Application Server?
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 11-06-2009, 09:32 PM
Member
 
Join Date: Nov 2009
Posts: 1
Rep Power: 0
alzorz is on a distinguished road
Default
borrowing the thread a little, have somewhat the same problem. But the difference is that i dont want my local IP on the computer but instead the IP that i ISP delivers to me, been searching around for quite some time and haven't found anything :/. Anyone know any good way to get it?
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 11-07-2009, 05:12 PM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 7,504
Rep Power: 11
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
Default
How about capturing the response of netstat -n within your application on Windows. In Mac OS, you can find those details in System Preference, and I couldn't remember the direct way to access it.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
Someone helped you? their helpful post.
Help:Forums FAQ|How To Ask Questions The Smart WayResources:The Java Tutorials|Glossary for Java|NetBeans IDE|Sun DownloadsWeb:WritOnceTips:Is your IDE the best?|Which Application Server?
Bookmark Post in Technorati
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to send a file from server to client and client saves the file? KoolCancer New To Java 3 07-29-2009 05:52 AM
client app santhu538 New To Java 1 02-28-2009 07:54 AM
Datagram Client and Server, client timer question saru88 Networking 1 10-05-2008 04:12 PM
UDP Client help misslilbit02 Advanced Java 0 03-09-2008 08:31 PM
Identify Client in Socket Client Server Application masadjie Networking 1 12-20-2007 10:18 AM


All times are GMT +2. The time now is 06:10 PM.



VBulletin, Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2009, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org