Class: Pakyow::Realtime::WebSocket::Connection
- Inherits:
-
Protocol::WebSocket::Connection
- Object
- Protocol::WebSocket::Connection
- Pakyow::Realtime::WebSocket::Connection
- Includes:
- Protocol::WebSocket::Headers
- Defined in:
- lib/pakyow/realtime/websocket.rb
Instance Attribute Summary collapse
-
#protocol ⇒ Object
readonly
Returns the value of attribute protocol.
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(framer, protocol = nil, **options) ⇒ Connection
constructor
A new instance of Connection.
Constructor Details
#initialize(framer, protocol = nil, **options) ⇒ Connection
Returns a new instance of Connection.
26 27 28 29 |
# File 'lib/pakyow/realtime/websocket.rb', line 26 def initialize(framer, protocol = nil, **) super(framer, **) @protocol = protocol end |
Instance Attribute Details
#protocol ⇒ Object (readonly)
Returns the value of attribute protocol.
31 32 33 |
# File 'lib/pakyow/realtime/websocket.rb', line 31 def protocol @protocol end |
Class Method Details
.call(framer, protocol = [], **options) ⇒ Object
22 23 24 |
# File 'lib/pakyow/realtime/websocket.rb', line 22 def self.call(framer, protocol = [], **) return self.new(framer, Array(protocol).first, **) end |
Instance Method Details
#call ⇒ Object
33 34 35 |
# File 'lib/pakyow/realtime/websocket.rb', line 33 def call self.close end |