Classification: |
Java |
Category: |
java.net |
Created: |
07/21/2000 |
Modified: |
06/22/2001 |
Number: |
FAQ-0503 |
Platform: |
ER5 |
|
Question: When I read from a socket it always waits for the specified timeout before returning
Answer: This problem results from a defect in the native implementation of sockets in ER5. It has been fixed for version 6. Basically, if a timeout has been set with the setSoTimeout(...) method on a java.net.Socket then a call to one of the read(...) methods of the InputStream returned by the java.net.Socket.getInputStream() method will always wait for the specified timeout period before returning. Likewise for calls to the accept(...) method of a java.net.ServerSocket or to the receive(...) method of a java.net.DatagramSocket.
|