On 4/4/07, Sebastiaan van Erk <[EMAIL PROTECTED]> wrote:
Ok, so I get a -1 on a read. Now what do I do?

If I just return from the event handler I immediately get another read
:-(. If I close the event I can't do output anymore.

Since there's not going to be any additional data from the client, and
presumably all data on the socket input has been consumed, it would
seem the only "read" event that this could be is a disconnect (which
on Windows is reported as a regular "there's data on the socket").
Feel free to do your homework too, and try to determine what this
event would be about, I can't reproduce everything.

Can't it just send me ERROR/TIMEOUT events, just like what would happen
if no READS arrive at all? In that case I can do async output (like in
the Messaging application example). The CoyoteInputStream I called the
read() on should know it reached the end of stream when I called read(),
so why does it cause another READ event immediately even though it
should know there is no more data? Shouldn't it behave in the same way
that it would normally behave after handling a read event and there
being no more data, i.e., do ERROR/TIMOUT events until the event is
closed or new data arrives (which in this case can't happen)?

As I said, it's not going to happen that way. The thing calling the
events is a poller, not the input stream, and they are generated when
something happens on the socket, or if there's leftover data waiting.

Rémy

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to