Find Out Who Is Accessing Your ServerSocket

Use this code to find out who is accessing your ServerSocket:

Socket aSock = myServerSocket.accept();System.out.println   ("Connection from : " + aSock.getInetAddress().getHostAddress() +                    ':' + aSock.getPort()); 
Share the Post:
Share on facebook
Share on twitter
Share on linkedin

Overview

Recent Articles: