[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Using glib IOChannels
- From: David Helder <dhelder umich edu>
- To: gtk-app-devel-list redhat com
- cc: partap yahoo com
- Subject: Re: Using glib IOChannels
- Date: Mon, 21 Feb 2000 21:40:33 -0500 (EST)
On Mon, 21 Feb 2000, Gurupartap Davis wrote:
> I was wondering if anyone knows if you can realistically use the glib
> iochannels stuff without using GTK... I saw a warning in one of the
> header files that it was made to work with the GIMP, and not to use it
> with Win32 unless you really know what you're doing... Well, I have a
> project that could make good use of the iochannel stuff, but not GTK
> (it's a server). It has to be portable to Win32, though...I was
> thinking I could use g_io_add_watch and g_main_iteration(TRUE) in the
> main loop to have it block until it gets some input.
>
> So it looks like this will work under Linux, but I'm wondering if
> anyone has actually used this successfully
Yes, you can and that's basically how you do it (or you can use GLib's
main loop). Take a look at the examples in GNet, a networking library:
http://www.eecs.umich.edu/~dhelder/misc/gnet
The echoclient/echoserver example is a good example of using GIOChannels
and the GLib main loop.
If you use GNet, it's more likely to work with Win32 (there's a port in
progress).
David
--
__ _ __
___/ /__ __ __(_)__/ / David Helder - University of Michigan
/ _ / _ `/ |/ / / _ / dhelder@umich.edu
|_,_/|_,_/|___/_/|_,_/ http://www.eecs.umich.edu/~dhelder
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]