Class: LegoEv3::TCPConnection

Inherits:
BaseConnection show all
Defined in:
lib/connection/tcp_client.rb

Instance Method Summary collapse

Methods inherited from BaseConnection

#flush, #send

Constructor Details

#initialize(host) ⇒ TCPConnection

Returns a new instance of TCPConnection.



6
7
8
9
10
# File 'lib/connection/tcp_client.rb', line 6

def initialize(host)
  super()

  @host = host
end

Instance Method Details

#closeObject



12
13
14
15
# File 'lib/connection/tcp_client.rb', line 12

def close
  @connection.close if @connection
  @connection = nil
end