class LibWebSocket::OpeningHandshake

This is a base class for LibWebSocket::OpeningHandshake::Client and LibWebSocket::OpeningHandshake::Server.

Attributes

error[RW]
secure[RW]

Public Class Methods

new(hash = {}) click to toggle source

Convert all hash keys to instance variables.

# File lib/libwebsocket/opening_handshake.rb, line 11
def initialize(hash = {})
  hash.each do |k,v|
    instance_variable_set("@#{k}",v)
  end
end

Public Instance Methods

req() click to toggle source

WebSocket request object.

# File lib/libwebsocket/opening_handshake.rb, line 18
def req
  @req ||= Request.new
end
res() click to toggle source

WebSocket response object.

# File lib/libwebsocket/opening_handshake.rb, line 23
def res
  @res ||= Response.new
end