• Post Reply Bookmark Topic Watch Topic
  • New Topic

HFSJ 2ed pag 123 (getLocalPort())

 
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?
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!