I gave the new buffer mode another try. Unfortunately there are a couple
of bugs. I don't really want to start changing things around, especially
because I am not sure how it was intended to work. I will just dump a
list here, some are questions. All this happens when using buffer mode
for both directions in nonblocking callback mode.

1) Stdio.File calls intput_from from the read cb but does not properly
handle the return -1 case and does not check errno(). The close callback
is never called. input_from also reactivates the read event, so the read
will reoccur for ever.

2) set_buffer_mode does __fd_set_output( this ) which leads to add()
calling Stdio.File()->write() calling output_to(), which leads to data
written in the wrong order initially. I guess __fd_set_output( ::write )
should be the right thing to do here?

3) Why does the io_call_write call triggered by add() only write a
maximum of 100 bytes?

arne

Reply via email to