Class: FFWD::TCP::SetupInput
- Inherits:
-
Object
- Object
- FFWD::TCP::SetupInput
- Defined in:
- lib/ffwd/protocol/tcp.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.
63 64 65 66 67 |
# File 'lib/ffwd/protocol/tcp.rb', line 63 def initialize config, log, connection @config = Hash[config] @log = log @connection = connection end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
61 62 63 |
# File 'lib/ffwd/protocol/tcp.rb', line 61 def config @config end |
Instance Method Details
#bind(core) ⇒ Object
69 70 71 72 73 74 |
# File 'lib/ffwd/protocol/tcp.rb', line 69 def bind core raise "Missing required option :host" if (host = @config[:host]).nil? raise "Missing required option :port" if (port = @config[:port]).nil? @config = Bind.prepare Hash[@config] Bind.new core, @log, host, port, @connection, @config end |