Class: ThriftHelpers::Connection::Socket
- Defined in:
- lib/thrift_client/connection/socket.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #close ⇒ Object
- #connect! ⇒ Object
-
#initialize(*args) ⇒ Socket
constructor
A new instance of Socket.
Methods inherited from Base
Constructor Details
#initialize(*args) ⇒ Socket
Returns a new instance of Socket.
4 5 6 7 8 9 10 |
# File 'lib/thrift_client/connection/socket.rb', line 4 def initialize(*args) super *args host, port = parse_server(@server) @transport = @transport.new(host, port.to_i, @timeout) @transport = @transport_wrapper.new(@transport) if @transport_wrapper end |
Instance Method Details
#close ⇒ Object
12 13 14 |
# File 'lib/thrift_client/connection/socket.rb', line 12 def close @transport.close end |
#connect! ⇒ Object
16 17 18 |
# File 'lib/thrift_client/connection/socket.rb', line 16 def connect! @transport.open end |