• Post Reply Bookmark Topic Watch Topic
  • New Topic

HFSJ 2ed pag 123 (getLocalPort())  RSS feed

Oricio Ocle
Ranch Hand
Posts: 284
Debian Firefox Browser Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Charles Lyons.

What do you think?
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!