From: Ferenc Engard Date: 2003-02-06T01:27:56+09:00 Subject: Re: WIN32API: callback functions? Gee, I didn't noticed that there is a ruby-pcap module. That's great! What a neat-o-featureful language this ruby is! :-)) On Wed, 5 Feb 2003, ts wrote: >>>>>> "F" == Ferenc Engard writes: > >F> p=Proc {|v1,v2,v3| fun(v1,v2,v3)} >F> pcap_loop(var1,var2,p,var4) > > Well, you have an example in ruby-pcap. In the case of this library the > choice was made to write it like this > > Pcap::Capture.open_live(...).each do | ... | > # ... > end > > #each, which seems to be like your pcap_loop, just call #yield > > Look at the source of ruby-pcap this will give you some ideas.