Re: Network event somewhere?
- From: "Kenneth Østby" <kenneth ostby gmail com>
- To: gnome-devel-list gnome org
- Subject: Re: Network event somewhere?
- Date: Mon, 24 Jul 2006 00:49:19 +0200
Hey there.
On 7/23/06, Mario Lenz <mario lenz gmx net> wrote:
But I can't call select() because the programm is in the gtk_main()
loop. Any suggestions?
It seems like what you're looking for is the magical GIOChannel to which you can create out of your already opened filedescriptor. That solves the whole select magic for you.
1. Open socket
2. Create new GIOChannel with the filedescriptor
3. Add a GIO watch with g_io_add_watch()
Now, pending on how heavy socket stuff you do, you might take a look at the gnet library. If it's simple networking you're looking for it worth a try.
Kenneth Østby
http://langly.org
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]