Class: Pio::Icmp
- Inherits:
-
Object
- Object
- Pio::Icmp
- Defined in:
- lib/pio/icmp.rb,
lib/pio/icmp/reply.rb,
lib/pio/icmp/format.rb,
lib/pio/icmp/message.rb,
lib/pio/icmp/request.rb
Overview
ICMP parser and generator
Defined Under Namespace
Classes: Format, Message, Reply, Request
Class Method Summary collapse
Class Method Details
.read(raw_data) ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/pio/icmp.rb', line 11 def self.read(raw_data) format = Format.read(raw_data) { Request.icmp_type => Request, Reply.icmp_type => Reply }.fetch(format.icmp_type).create(format) rescue raise Pio::ParseError, $ERROR_INFO. end |