From: kenny roytman Date: 2007-11-16T14:45:05+09:00 Subject: ruby/pcap with threads Hi Everyone, Can someone please explain why I don't see any output from the following code? I'm stumped. By the way, "en1" is the name of my network device. Thanks. code: 1 require 'pcaplet' 2 3 include Pcap 4 5 6 x = Thread.new { 7 pcaplet = Pcaplet.new("-i en1") 8 9 pcaplet.each_packet { |pkt| 10 puts "#{pkt.src.to_num_s}:#{pkt.sport} #{pkt.dst.to_num_s}:#{pkt.dport}" if pkt.ip? 11 } 12 13 } 14 15 x.join 16