Some not very frequently used methods :
getServerPort(): Returns the port number to which the request was sent. (8080 in my case)
getServerName(): Name of the server (I used localhost)
getLocalAddr(): I got 0.0.0.0
getLocalPort() : This returns the port at which the request actually ends up. This is as the requests are made to the same port, but the server forwards them to different ports so that the application it can handle multiple threads.
getRemotePort(): Since the server asks for remote port, it is the client that is remote for the server. So, it returns the port number on the client on which the request was sent.
No comments:
Post a Comment