Class: FFWD::UDP::SetupInput
- Inherits:
-
Object
- Object
- FFWD::UDP::SetupInput
- Defined in:
- lib/ffwd/protocol/udp.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
Instance Method Summary collapse
- #bind(core) ⇒ Object
-
#initialize(config, log, connection) ⇒ SetupInput
constructor
A new instance of SetupInput.
- #tunnel(core, plugin) ⇒ Object
Constructor Details
#initialize(config, log, connection) ⇒ SetupInput
Returns a new instance of SetupInput.
51 52 53 54 55 |
# File 'lib/ffwd/protocol/udp.rb', line 51 def initialize config, log, connection @config = config @log = log @connection = connection end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
49 50 51 |
# File 'lib/ffwd/protocol/udp.rb', line 49 def config @config end |
Instance Method Details
#bind(core) ⇒ Object
57 58 59 60 61 62 |
# File 'lib/ffwd/protocol/udp.rb', line 57 def bind core raise "Missing required key :host" if (host = @config[:host]).nil? raise "Missing required key :port" if (port = @config[:port]).nil? @config = Bind.prepare Hash[@config] Bind.new core, @log, host, port, @connection, @config end |