class DebugFilter

The DebugFilter class simply logs all that passes through it

Public Class Methods

new(pstack) click to toggle source

Construct filter

pstack

The ProtocolStack associated with this filter

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

Public Instance Methods

filter_in(str) click to toggle source

The #filter_in method filters input data

str

The string to be processed

return

The filtered data

# 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
filter_out(str) click to toggle source

The #filter_out method filters output data

str

The string to be processed

return

The filtered data

# 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