Class: Coronet::TransportMechanism::Base

Inherits:
Object
  • Object
show all
Includes:
Contractual::Interface
Defined in:
lib/coronet/transport_mechanism/base.rb

Direct Known Subclasses

LengthPrefixedTcpTransport

Instance Method Summary collapse

Instance Method Details

#transmit(data, io) ⇒ Object

end



19
20
21
22
23
24
25
26
# File 'lib/coronet/transport_mechanism/base.rb', line 19

def transmit(data, io)
  # io = open(host, port)
  write(data, io)
  response = read(io)
  close(io)
  
  response
end