Class: Protocol::HTTP::Executor::Transport::Endpoint

Inherits:
Object
  • Object
show all
Defined in:
lib/protocol/http/executor/transport.rb

Overview

One endpoint of an execution transport.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(control, body) ⇒ Endpoint

Initialize an endpoint from its connected IO objects.



19
20
21
22
# File 'lib/protocol/http/executor/transport.rb', line 19

def initialize(control, body)
	@control = Channel.new(control)
	@body = Channel.new(body)
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



28
29
30
# File 'lib/protocol/http/executor/transport.rb', line 28

def body
  @body
end

#controlObject (readonly)

Returns the value of attribute control.



25
26
27
# File 'lib/protocol/http/executor/transport.rb', line 25

def control
  @control
end

Instance Method Details

#closeObject

Close all channels.



31
32
33
34
# File 'lib/protocol/http/executor/transport.rb', line 31

def close
	@control.close
	@body.close
end

#The bidirectional body channel.=(bidirectionalbodychannel. = (value)) ⇒ Object



28
# File 'lib/protocol/http/executor/transport.rb', line 28

attr :body

#The bidirectional control channel.=(bidirectionalcontrolchannel. = (value)) ⇒ Object



25
# File 'lib/protocol/http/executor/transport.rb', line 25

attr :control