Find out who is accessing my ServerSocket

Socket aSock = myServerSocket.accept();

System.out.println 
  ("Connection from : " 
     + aSock.getInetAddress().getHostAddress() 
     + ':' + aSock.getPort()); 



If you find this article useful, consider making a small donation
to show your support for this Web site and its content.

Written and compiled by Réal Gagnon ©1998-2010
[ home ]