• Post Reply Bookmark Topic Watch Topic
  • New Topic

Https and connection timeout  RSS feed

 
Adam Teg
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When you establish a https session, can you control how long the session can last? I want to submit a file to a server and wait for a response for a given number of seconds and close the sessions if I don't get a response.

What is a good book to learn https, submitting a file and waiting for a response?

Thanks
 
Freddy Wong
Ranch Hand
Posts: 959
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you use HttpsURLConnection, you can set the read timeout by calling setReadTimeout(). It's only supported in Java 5 above, though.
 
Freddy Wong
Ranch Hand
Posts: 959
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For the book, you can try to read Java Network Programming (O'Reilly) by Elliotte Rusty Harold.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!