Method: NATPMP#initialize
- Defined in:
- lib/natpmp.rb
#initialize(priv, pub, maxlife, type) ⇒ NATPMP
Returns a new instance of NATPMP.
92 93 94 95 96 97 98 99 100 101 102 103 |
# File 'lib/natpmp.rb', line 92 def initialize priv, pub, maxlife, type @priv = priv @pub = pub @maxlife = maxlife raise "Time must be >= 0" if maxlife < 0 @type = type # These are filled in when a request is made # @life = 0 @mapped = 0 end |