On Mon, 11 Sep 2000, Plonkowski, Piotr P SPOLSKA-IS/1 wrote:
> Hi Guys,
> I'm looking for somebody who can tell me in few words how to use pthreads in
> the gtk+. I do not need a gtk+biblie, just a litle instruction and maybe few
> examples.
> I've made a simple programme (snifer) and after run pcap I can not do
> anything. I believe that pthreads can help me.
> Thanks in advance.
>
> Piotr.
>
> _______________________________________________
> gtk-list mailing list
> [EMAIL PROTECTED]
> http://mail.gnome.org/mailman/listinfo/gtk-list
>
Are you sure you need to use pthreads? I had a multiplexing problem with
pcap which i solved by setting up a callback function (using
g_io_channel_unix_new) for the listen file descriptor in the pcap
structure (pcap->fd) for the read condition.
Then when there is a packet to be read by pcap, the callback is called,
and you can call pcap_next() to get it.
- David
_______________________________________________
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list