This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to change default "timeout" ?

 
Rahul Kothari
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have a portscanner program and i want to add an option to the prog to change the default timeout. how do i do that ? i m pretty new to java, so dunno much. also, i srched on sun.java.com but much of it went over my head.
how much is the default timeout anyways ?


TIA.
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Socket class has a setSoTimeout() method which is probably what you want. There's also a connect() method with timeout option, but since the Socket constructor you're using returns a socket that's already connnected, that probably isn't necessary.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic