This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Hands On Software Engineering with Python and have Brian Allbey on-line!
See this thread for details.
Win a copy of Hands On Software Engineering with Python this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
Bartenders:
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

Valid Port Range  RSS feed

 
Ranch Hand
Posts: 442
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
with 64k to work with the valid port range is (1024 x 64) so thats 0 through 65535, problem is the server can listen on port 0 for example, but the client cannot connect, or similar possible problems, my feeling on this is that we should allow all between that range, even well known reserved ports, but it should be the users reposibility to ensure that on their operating system the port configured can be used, is this correct?
 
Ranch Hand
Posts: 117
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is what I did. Just make sure you document your assumptions.
 
Ta Ri Ki Sun
Ranch Hand
Posts: 442
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Damian Ryan:
This is what I did. Just make sure you document your assumptions.


agreed, done it is then, thank you
 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
If the port number is out of range catch the exception also. It is advisable to catch the following exception:
catch( IllegalArgumentException illegalArgumentException )
{
System.out.println( " Port number is out of range. It is recommended to use valid port number.");
System.exit( 0 );
}
Cheers
Srinivas
SCJP,SCJD
 
I just had the craziest dream. This tiny ad was in it.
Programmatically Create PDF Using Free Spire.PDF with Java
https://coderanch.com/wiki/703735/Programmatically-Create-PDF-Free-Spire
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!