[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Frontend for a distributed IP multicast program
- From: Sunjay Bhatnagar <sanjay ncra tifr res in>
- To: gtk-app-devel-list redhat com
- Subject: Frontend for a distributed IP multicast program
- Date: Tue, 19 Oct 1999 23:36:26 +0617 (IST)
Matthew Hiller writes:
> The solution that I came up with was to set up a signal-handling
>function that reads pending messages off the socket and call alarm(1)
>before entering gtk_main(). (I'd also put another alarm(1) at the end of
>the signal handling function; the net effect being that the program would
>thus check the socket once per second.)
Have a look at gdk_input_add() routine. You can have the Gtk event
loop monitor events on the socket by supplying this rouinte the scoket
descriptor and attach a callback function which will be called
whenever socket is ready to be read.
This way, your application will become asynchronous (instead of
polling the socket). Does this help?
Regards,
sanjay
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]