Re: Async communication



Daniel Nilsson <daniel oden homeip net> writes:

> Any thoughts of a easier way to do this ? Could I use the glib
> GIOChannel somehow or coud the glib Asynchronous Queues help in any
> way ?

Since you can select() on the serial port, you can avoid threads by
having a function called every time something interesting happens on
the file descriptor. The GLib mainloop has the functionality for this,
but I wouldn't suggest using the GIOChannel; I think they are way too
complex.

I normally use the code in

        http://www.daimi.au.dk/~sandmann/watch/

for that sort of thing.


Søren



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]