Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

reuse address  RSS feed

 
marco tognoni
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying using a socket, that binds a local port. When the socket is close, the program throws exception:
Java.net.SocketException: errno: 4114, error: Address already in use
How I can set the option setreuseaddress?
I use jdk 1.3!
thanks
 
Michael Morris
Ranch Hand
Posts: 3451
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Marco,
You probably have to update to 1.4. There is a setReuseAddress() method for both Socket and ServerSocket in 1.4 but not in previous SDK's.
Michael Morris
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!