Hello, i' ve just read this in the great HFSJ 2ed (pag 123)
The difference between getLocalPort() and
getServerPort() is more subtle....
Yes, there’s a difference, because
although the requests are sent to a single port (where
the server is listening), the server turns around and
fi nds a different local port for each thread so that the
app can handle multiple clients at the same time.
I think these words could lead to a misunderstanding.
In this thread a good explanation is given by