Sha256: d6ffbfd537c250e05c4d5c49c0626d8124bf797939f5d7e0ed46a9d3c9b6f159
Contents?: true
Size: 711 Bytes
Versions: 2
Compression:
Stored size: 711 Bytes
Contents
require 'websocket/driver' module ActionCable module Connection # Wrap the real socket to minimize the externally-presented API class WebSocket def initialize(env, event_target, stream_event_loop) @websocket = ::WebSocket::Driver.websocket?(env) ? ClientSocket.new(env, event_target, stream_event_loop) : nil end def possible? websocket end def alive? websocket && websocket.alive? end def transmit(data) websocket.transmit data end def close websocket.close end def rack_response websocket.rack_response end protected attr_reader :websocket end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
actioncable-5.0.0.beta3 | lib/action_cable/connection/web_socket.rb |
actioncable-5.0.0.beta2 | lib/action_cable/connection/web_socket.rb |