This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Sockets and Internet Protocols and the fly likes SSLSocket Read timed out issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "SSLSocket Read timed out issue" Watch "SSLSocket Read timed out issue" New topic
Author

SSLSocket Read timed out issue

Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9345
    
    2

Guys,

I'm facing problems with reading the bytes written on a SSLSocket. Following is what I'm doing:

(1) Sending some bytes to a server which has an SSLSocket opened
(2) I'm able to see the bytes that I have sent to the server (printed the log lines on the server)
(3) The server send its response and I'm able to see the response in the server logs
(4) When I try to read that from my client using DataInputStream that I get from my SSLSocket, I get the following error:



Any ideas on how to get around this? I tried by increasing the time out period..... set it to infinite also did not help.


SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9345
    
    2

When I set the timeout parameter (the call to the setSoTimeout() method) as setSoTimeout(0*1000), there seems to be nothing happening... the program is standstill... looks like my client is waiting for reading something on the InputStream written by the server. I'm totally confused and seems like I'm about to hit a dead end.
 
Consider Paul's rocket mass heater.
 
subject: SSLSocket Read timed out issue
 
Similar Threads
web service security issue
ObjectInputStream.readObject() hangs forever during socket communication
Program to send Email using JavaMail not working.
SSL enabled client code with client authentication
SSLHandshakeException