Re: Network event somewhere?

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

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