Java ServerSocket getRemoteSocketAddress() MethodThe getRemoteSocketAddress() method of ServerSocket class uses to return the address of the socket endpoint to which it connected. If it is not connected, then it returns null. SyntaxReturns:A SocketAddress representing the remote endpoint of this socket, or null if it is not connected yet. Since:1.4 Example 1Output: Example 2ServerApplication: ClientApplication Output:
Next TopicJava ServerSocket
|