Kacheong Poon wrote: > On 05/ 6/10 03:23 AM, Andrew Gabriel wrote: >> Unfortunately, 2) is not quite handled in this case, as there are no >> values which are interpreted as infinity (i.e. no timeout), so I still >> have to handle the case where connect(), read(), write(), etc return >> timeouts, even if they do it less often. Having an infinity value might >> allow me to simplify my application coding (even though I still have to >> handle the possibility of a RST). Is the value 'zero' free to be >> interpreted as infinity? > > > The value 0 is free and indeed can be used to mean infinity. > But is (2) really useful in practice? Having that only > eliminates a subset of errors. And the handling of this > subset of errors is probably similar to the handling of > its complement. If folks really think that it is a useful, > I can add this meaning assuming that there is no objection.
The useful case I can think of is an application where all of the meaningful timers are implemented in user space, and the socket is set non-blocking. In other words, the application isn't expecting to see time-out on connect() or in other cases, and is instead expecting to discard (perhaps with linger=0) when the socket isn't behaving as needed. In that case, a kernel-level timer is just a nuisance (albeit a minor one). -- James Carlson 42.703N 71.076W <carls...@workingcode.com> _______________________________________________ opensolaris-arc mailing list opensolaris-arc@opensolaris.org