Class: LibWebSocket::OpeningHandshake
- Inherits:
-
Object
- Object
- LibWebSocket::OpeningHandshake
- Defined in:
- lib/libwebsocket/opening_handshake.rb,
lib/libwebsocket/opening_handshake/client.rb,
lib/libwebsocket/opening_handshake/server.rb
Overview
This is a base class for LibWebSocket::OpeningHandshake::Client and LibWebSocket::OpeningHandshake::Server.
Defined Under Namespace
Instance Attribute Summary collapse
-
#error ⇒ Object
Returns the value of attribute error.
-
#secure ⇒ Object
Returns the value of attribute secure.
Instance Method Summary collapse
-
#initialize(hash = {}) ⇒ OpeningHandshake
constructor
Convert all hash keys to instance variables.
-
#req ⇒ Object
WebSocket request object.
-
#res ⇒ Object
WebSocket response object.
Constructor Details
#initialize(hash = {}) ⇒ OpeningHandshake
Convert all hash keys to instance variables.
11 12 13 14 15 |
# File 'lib/libwebsocket/opening_handshake.rb', line 11 def initialize(hash = {}) hash.each do |k,v| instance_variable_set("@#{k}",v) end end |
Instance Attribute Details
#error ⇒ Object
Returns the value of attribute error.
8 9 10 |
# File 'lib/libwebsocket/opening_handshake.rb', line 8 def error @error end |
#secure ⇒ Object
Returns the value of attribute secure.
8 9 10 |
# File 'lib/libwebsocket/opening_handshake.rb', line 8 def secure @secure end |