When I create a socket on the server and accept the incoming connection:
conn, addr = s.accept()
Both print conn.getsockname()and print s.getsockname()print the same port number.
I thought that "conn" should have represented a NEW socket. How to get the port number of this new socket?
Thank!
source
share