On May 13, 2006, at 8:14 AM, Michael Koch wrote:

On Sat, May 13, 2006 at 05:11:16PM +0200, Sven de Marothy wrote:
On Sat, 2006-05-13 at 16:58 +0200, Michael Koch wrote:

AFAIK Linux is the only one. If we want to stay portable we need to use
select() and wait for the time of the timeout. In libgcj its already
handled this way. Thats the safest.

Actually, I don't think we need to stay portable though.
The JDK docs say: "Some non-standard implmentation of this method may
ignore the specified timeout."

So.. Presumably, Solaris supports it too. But we don't need to though.

Anyway, this is still better than before when it didn't work at all :)

Well, it will still be broken an most if not all non-Linux Unices. Even
on older (2.4 or older) Linuxes it will be broken.


For what it's worth, Mac OS X 10.4.6's man page for `setsockopt' claims to support this. But using select is ultimately better, and even better than that is using epoll or kqueue where available.

Attachment: PGP.sig
Description: This is a digitally signed message part

Reply via email to