tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Remy Maucherat <>
Subject Re: Proposed new CometEvent.notify method
Date Thu, 03 May 2007 16:20:47 GMT
Filip Hanik - Dev Lists wrote:
> yes, but that's ok. the sequence would be this
> a) available() == 1
> b) == 0
> c) available() == 0
> what this would mean, is that available()==1 means there is data fetched 
> from the actual socket, may or may not translate into user data.
> In the sequence above, that is such a case, available returned 1, cause 
> there was data, read returned 0 cause it didn't translate into user 
> data, and further attempts to available() showed that there were no more 
> data to be fetched.
> When new data comes in, available() (non blocking) again shows up as 1, 
> may or may not return data.
> I personally, think this would be an extremely elegant way to do non 
> blocking read, as this would also be useful for regular servlets.

No, I don't agree with reading bytes in the lower layer as it would 
swallow problems even more than doing it in the adapter without any 
additional benefit (BTW, read cannot return 0). There's also a likely 
problem that it would require additional structures to hold that data, 
and which are present in the adapter.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message