Class: Coronet::RemoteEndpoint

Inherits:
Object
  • Object
show all
Defined in:
lib/coronet/remote_endpoint.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(host, port, protocol) ⇒ RemoteEndpoint

Returns a new instance of RemoteEndpoint.



6
7
8
9
10
# File 'lib/coronet/remote_endpoint.rb', line 6

def initialize(host, port, protocol)
  @host = host
  @port = port
  @protocol = protocol
end

Instance Attribute Details

#hostObject

Returns the value of attribute host.



3
4
5
# File 'lib/coronet/remote_endpoint.rb', line 3

def host
  @host
end

#portObject

Returns the value of attribute port.



3
4
5
# File 'lib/coronet/remote_endpoint.rb', line 3

def port
  @port
end

#protocolObject

Returns the value of attribute protocol.



4
5
6
# File 'lib/coronet/remote_endpoint.rb', line 4

def protocol
  @protocol
end

Instance Method Details

#transmit(request) ⇒ Object



12
13
14
# File 'lib/coronet/remote_endpoint.rb', line 12

def transmit(request)
  @protocol.transmit(request, @host, @port)
end