Angus Leeming <[EMAIL PROTECTED]> writes:
| On Thursday 22 August 2002 10:49 am, Lars Gullik Bj�nnes wrote:
>> Angus Leeming <[EMAIL PROTECTED]> writes:
>> | The lyxserver uses the low-level C-functions open(), close(), read() and
>> | write() to get, put data to the in,output pipes.
>> |
>> | Why? Is their a reason why we don't use C++ filestreams?
>>
>> because you cannot bind it portably to a socket...
>
| Ok, so there's no reason why my server/client test case wouldn't work with
| filestreams as a first step towards Pipestream, SocketStream. Good.
>
>> and you need to register the socket with the xforms socket handler...
>
| You mean
|
| fl_add_io_callback(pipe, FL_READ, ioCB, 0);
| fl_remove_io_callback(pipe, FL_READ, ioCB);
>
| ? Couldn't we achieve the same goal by using a timer to interogate the
| filestream every sec or so.
No, that is bad, bad solution.
| Note that the magic comment in xforms async_io.c appears to be:
>
| Actual input/output handling is triggered in the main loop via fl_watch_io.
>
| I append the fl_watch_io. Can we not do the same thing with a filestream?
How do you run select or poll on a filestream?
Then you must modify the filestream...
And your really want the handling of this to be part of the main event
loop.
--
Lgb