Class: Pakyow::Realtime::WebSocket::Connection

Inherits:
Protocol::WebSocket::Connection
  • Object
show all
Includes:
Protocol::WebSocket::Headers
Defined in:
lib/pakyow/realtime/websocket.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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, **options)
  super(framer, **options)
  @protocol = protocol
end

Instance Attribute Details

#protocolObject (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 = [], **options)
  return self.new(framer, Array(protocol).first, **options)
end

Instance Method Details

#callObject



33
34
35
# File 'lib/pakyow/realtime/websocket.rb', line 33

def call
  self.close
end