Class DebugFilter
In: lib/network/protocol/debugfilter.rb
Parent: Filter
DebugFilter
Filter
dot/f_32.png

The DebugFilter class simply logs all that passes through it

Methods

filter_in   filter_out   new  

Public Class methods

Construct filter

pstack
The ProtocolStack associated with this filter

[Source]

# File lib/network/protocol/debugfilter.rb, line 26
  def initialize(pstack)
    super(pstack)
  end

Public Instance methods

The filter_in method filters input data

str
The string to be processed
return
The filtered data

[Source]

# File lib/network/protocol/debugfilter.rb, line 33
  def filter_in(str)
    return "" if str.nil? || str.empty?
    log.debug("(#{@pstack.conn.object_id}) INPUT #{str.inspect}" )
    str
  end

The filter_out method filters output data

str
The string to be processed
return
The filtered data

[Source]

# File lib/network/protocol/debugfilter.rb, line 42
  def filter_out(str)
    return "" if str.nil? || str.empty?
    log.debug("(#{@pstack.conn.object_id}) OUTPUT #{str.inspect}" )
    str
  end

[Validate]