Click to See Complete Forum and Search --> : Find client's ephemeral port


suren612
December 1st, 2008, 06:27 AM
Hi,

Please tell me how I can find the IP address and the ephemeral port number ( the port number assigned automatically by the OS on calling connect() ) that a client is using to communicate with a server. Thanks in advance.

Richard.J
December 1st, 2008, 10:27 AM
on client side: gethostname
on server side: getpeername