Reply :<br><br>Gianluca , thank, i tried it, i see what you mean . In the capture loop , the UI tends to go dead and unresponsive to clicks and stuff . I think i'll do it the thread way . <br><br><b><i>Gianluca Varenni <gianluca.varenni@cacetech.com></i></b> wrote:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> Well, pcap_breakloop would work but, as I wrote in the other mail, the UI is <br>not responsive since it's stuck receiving packets in the "onButtonCapture" <br>handler...<br><br>In any case, I usually prefer not to use "pcap_breakloop". This API is there <br>mainly to interrupt a pcap_loop or pcap_dispatch call, if you use <br>pcap_next_ex you don't have the problem of breaking the internal loop of <br>"pcap_loop" or "pcap_dispatch", because you explicitely create the loop <br>surrounding pcap_next_ex.<br><br>Have a nice day<br>GV<br><br><br><br><br>----- Original Message ----- <br>From: "Gubrush
." <vga_planets@hotmail.com><br>To: <winpcap-users@winpcap.org><br>Sent: Friday, May 12, 2006 7:53 AM<br>Subject: RE: [Winpcap-users] Re: breaking out of a pcap_next_ex() loop<br><br><br>> Hi<br>><br>> How about pcap_breakloop( pointer_to_handle );<br>><br>> http://www.winpcap.org/docs/docs31/html/group__wpcapfunc.html#ga15<br>><br>><br>><br>>>From: joe kibz <chikabanga2005@yahoo.com><br>>>Reply-To: winpcap-users@winpcap.org<br>>>To: winpcap-users@winpcap.org<br>>>Subject: [Winpcap-users] Re: breaking out of a pcap_next_ex() loop<br>>>Date: Fri, 12 May 2006 05:53:59 -0700 (PDT)<br>>><br>>>problem:<br>>><br>>> here's my code in brief:<br>>><br>>> void CButton::onButtonCapture(){<br>>><br>>> open a device handle;<br>>><br>>> while(pcap_next_ex())//capture packets;<br>>><br>>> }<br>>><br>>> ?How do i break out or stop a
pcap_next_ex() loop whenever i want ?<br>>> ?How does the timeout value in pcap_next_ex() parameters work ?<br>>><br>>><br>>> joe<br>>><br>>><br>>>---------------------------------<br>>>Yahoo! Mail goes everywhere you do. Get it on your phone.<br>><br>><br>>>_______________________________________________<br>>>Winpcap-users mailing list<br>>>Winpcap-users@winpcap.org<br>>>https://www.winpcap.org/mailman/listinfo/winpcap-users<br>><br>><br>> _______________________________________________<br>> Winpcap-users mailing list<br>> Winpcap-users@winpcap.org<br>> https://www.winpcap.org/mailman/listinfo/winpcap-users <br><br>_______________________________________________<br>Winpcap-users mailing
list<br>Winpcap-users@winpcap.org<br>https://www.winpcap.org/mailman/listinfo/winpcap-users<br></chikabanga2005@yahoo.com></winpcap-users@winpcap.org></vga_planets@hotmail.com></blockquote><br><p>
                <hr size=1>Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. <a href="http://us.rd.yahoo.com/mail_us/taglines/postman7/*http://us.rd.yahoo.com/evt=39666/*http://messenger.yahoo.com"> Great rates starting at 1¢/min.