|
|
|
|
JDK1.6.0_07 and _03: Non-blocking socket "oddity"
Posted:
Mar 30, 2009 12:00 PM
|
|
|
I have the following situation (on both Linux and MacOS) -- A non-blocking connection established to a server for a long-term persistent message oriented exchange (request-response). I'm doing negative testing and see something very odd (at least to my somewhat experienced "C" socket programming eyes).
When I pull the cable, the select does not wake up (this is good, and what what I expect). When I write to the socket while the cable is pulled, I expect to see an IOException, but I don't. When I plug the cable back in at the server, the select in the java application "breaks", and the recovery processing is initiated. So, is this normal expected behavior in Java? Shouldn't the SocketChannel.write( ByteBuffer src) call fail?
I've searched the forums and not found an answer to this -- if its already been answered, please point me to it, and provide the search you used to find it.
thanks and regards,
Dave
|
|
|
|
|
|
|
Re: JDK1.6.0_07 and _03: Non-blocking socket "oddity"
Posted:
Mar 31, 2009 1:10 PM
in response to: dave_raymer
|
|
|
I tend to agree. This behavior isn't what I expect.
|
|
|
|
|