ActionCable::Connection::WebSocket

Wrap the real socket to minimize the externally-presented API

Methods
A
C
N
P
R
T
Attributes
[R] websocket

TODO Change this to private once we've dropped Ruby 2.2 support. Workaround for Ruby 2.2 “private attribute?” warning.

Class Public methods
new(env, event_target, event_loop, protocols: ActionCable::INTERNAL[:protocols])
# File actioncable/lib/action_cable/connection/web_socket.rb, line 7
def initialize(env, event_target, event_loop, protocols: ActionCable::INTERNAL[:protocols])
  @websocket = ::WebSocket::Driver.websocket?(env) ? ClientSocket.new(env, event_target, event_loop, protocols) : nil
end
Instance Public methods
alive?()
# File actioncable/lib/action_cable/connection/web_socket.rb, line 15
def alive?
  websocket && websocket.alive?
end
close()
# File actioncable/lib/action_cable/connection/web_socket.rb, line 23
def close
  websocket.close
end
possible?()
# File actioncable/lib/action_cable/connection/web_socket.rb, line 11
def possible?
  websocket
end
protocol()
# File actioncable/lib/action_cable/connection/web_socket.rb, line 27
def protocol
  websocket.protocol
end
rack_response()
# File actioncable/lib/action_cable/connection/web_socket.rb, line 31
def rack_response
  websocket.rack_response
end
transmit(data)
# File actioncable/lib/action_cable/connection/web_socket.rb, line 19
def transmit(data)
  websocket.transmit data
end