class WebSocket::HTTP::Response

Constants

STATUS_LINE

Attributes

code[R]

Public Instance Methods

[](name) click to toggle source
# File lib/websocket/http/response.rb, line 11
def [](name)
  @headers[HTTP.normalize_header(name)]
end
body() click to toggle source
# File lib/websocket/http/response.rb, line 15
def body
  @buffer.pack('C*')
end

Private Instance Methods

start_line(line) click to toggle source
# File lib/websocket/http/response.rb, line 21
def start_line(line)
  return false unless parsed = line.scan(STATUS_LINE).first
  @code = parsed[1].to_i
  true
end