Class: RawNetCapture
- Inherits:
-
StringIO
- Object
- StringIO
- RawNetCapture
- Defined in:
- lib/raw_net_capture/raw_net_capture.rb
Instance Attribute Summary collapse
-
#raw_traffic ⇒ Object
readonly
Returns the value of attribute raw_traffic.
Instance Method Summary collapse
-
#initialize ⇒ RawNetCapture
constructor
A new instance of RawNetCapture.
- #received(data) ⇒ Object
- #sent(data) ⇒ Object
Constructor Details
#initialize ⇒ RawNetCapture
Returns a new instance of RawNetCapture.
6 7 8 9 |
# File 'lib/raw_net_capture/raw_net_capture.rb', line 6 def initialize super reset end |
Instance Attribute Details
#raw_traffic ⇒ Object (readonly)
Returns the value of attribute raw_traffic.
4 5 6 |
# File 'lib/raw_net_capture/raw_net_capture.rb', line 4 def raw_traffic @raw_traffic end |
Instance Method Details
#received(data) ⇒ Object
11 12 13 |
# File 'lib/raw_net_capture/raw_net_capture.rb', line 11 def received(data) @raw_traffic << [:received, data] end |
#sent(data) ⇒ Object
15 16 17 |
# File 'lib/raw_net_capture/raw_net_capture.rb', line 15 def sent(data) @raw_traffic << [:sent, data] end |