• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

NetworkInterface.getByInetAddress() in a remote computer

 
Manuel Leiria
Ranch Hand
Posts: 171
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is the code I have. Obviously it doesn't work because the given ip is a remote computer.

My question is:is it possible to use some sort of this code (something similar) to get the NetworkInterface of a remote machine?




thanks in advance,
 
Rusty Shackleford
Ranch Hand
Posts: 490
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Assuming you have a connection via Socket, you can look at the socket class, you will see a method called getRemoteSocketAddress that returns a SocketAddress which will print the IP address and port of the other endpoint. That is probably the most direct way.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic