Originally posted by nitin_k:
When ServerSocket.accept() method is called,
it waits for client requests from remote machines.
After receiving a request, it returns a new Socket object.
i had a doubt whether this new socket object is bound with
same port as the ServerSocket or some different unique port?
cos when i invoked getPort method on both ServerSocket
object and new Socket object, it returned same port no.
which i guess conflicts with the theory.
any help is appreciated.