Sha256: 096ed1bbbbe7b174114ee44029b5dab87e8261a028d394390457c51bd0616c08
Contents?: true
Size: 340 Bytes
Versions: 2
Compression:
Stored size: 340 Bytes
Contents
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__) require 'pcapz' require 'packetgen' cap = Pcapz.capture.new # CTRL+C Exit trap "SIGINT" do cap.stop! unless cap.stopped? end begin cap.packets do |packet| puts PacketGen.parse(packet).headers.map(&:method_name).join(" ") end ensure cap.stop! unless cap.stopped? end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
pcapz-1.0.1 | examples/headers.rb |
pcapz-1.0.0 | examples/headers.rb |