Class: RawNetCapture

Inherits:
StringIO
  • Object
show all
Defined in:
lib/raw_net_capture/raw_net_capture.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeRawNetCapture

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_trafficObject (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