Class: Async::HTTP::Protocol::Response

Inherits:
Response
  • Object
show all
Defined in:
lib/async/http/protocol/response.rb

Overview

This is generated by client protocols.

Direct Known Subclasses

HTTP11::Response, HTTP2::Response

Instance Attribute Summary collapse

Attributes inherited from Response

#body, #headers, #reason, #status, #version

Instance Method Summary collapse

Methods inherited from Response

[], #bad_request?, #continue?, #failure?, for_exception, #initialize, #partial?, #preserve_method?, #redirection?, #server_failure?, #success?, #to_s

Methods included from Body::Reader

#body?, #close, #each, #finish, #read, #stop

Constructor Details

This class inherits a constructor from Async::HTTP::Response

Instance Attribute Details

#protocolObject (readonly)

Returns the value of attribute protocol.



31
32
33
# File 'lib/async/http/protocol/response.rb', line 31

def protocol
  @protocol
end

Instance Method Details

#hijack?Boolean

Returns:

  • (Boolean)


33
34
35
# File 'lib/async/http/protocol/response.rb', line 33

def hijack?
	false
end

#peerObject



37
38
39
40
41
# File 'lib/async/http/protocol/response.rb', line 37

def peer
	if @protocol
		@protocol.peer
	end
end

#remote_addressObject



43
44
45
# File 'lib/async/http/protocol/response.rb', line 43

def remote_address
	@remote_address ||= peer.remote_address
end

#remote_address=(value) ⇒ Object



47
48
49
# File 'lib/async/http/protocol/response.rb', line 47

def remote_address= value
	@remote_address = value
end