diff options
author | Matthew Draper <matthew@trebex.net> | 2016-10-01 10:57:26 +0930 |
---|---|---|
committer | Matthew Draper <matthew@trebex.net> | 2016-10-01 15:35:59 +0930 |
commit | d44177d45e59ece7c2b8ed37bd2bfc23d28d7b22 (patch) | |
tree | 498ec595119ad2f9037e7d29c85e39ac51f43f12 /actioncable/lib/action_cable/connection/faye_client_socket.rb | |
parent | 9588a3d66d4ca6ba122d32417aa62680f441bf40 (diff) | |
download | rails-d44177d45e59ece7c2b8ed37bd2bfc23d28d7b22.tar.gz rails-d44177d45e59ece7c2b8ed37bd2bfc23d28d7b22.tar.bz2 rails-d44177d45e59ece7c2b8ed37bd2bfc23d28d7b22.zip |
Remove Faye mode
No deprecation, because it was never documented.
Diffstat (limited to 'actioncable/lib/action_cable/connection/faye_client_socket.rb')
-rw-r--r-- | actioncable/lib/action_cable/connection/faye_client_socket.rb | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/actioncable/lib/action_cable/connection/faye_client_socket.rb b/actioncable/lib/action_cable/connection/faye_client_socket.rb deleted file mode 100644 index 06e92c5d52..0000000000 --- a/actioncable/lib/action_cable/connection/faye_client_socket.rb +++ /dev/null @@ -1,48 +0,0 @@ -require "faye/websocket" - -module ActionCable - module Connection - class FayeClientSocket - def initialize(env, event_target, stream_event_loop, protocols) - @env = env - @event_target = event_target - @protocols = protocols - - @faye = nil - end - - def alive? - @faye && @faye.ready_state == Faye::WebSocket::API::OPEN - end - - def transmit(data) - connect - @faye.send data - end - - def close - @faye && @faye.close - end - - def protocol - @faye && @faye.protocol - end - - def rack_response - connect - @faye.rack_response - end - - private - def connect - return if @faye - @faye = Faye::WebSocket.new(@env, @protocols) - - @faye.on(:open) { |event| @event_target.on_open } - @faye.on(:message) { |event| @event_target.on_message(event.data) } - @faye.on(:close) { |event| @event_target.on_close(event.reason, event.code) } - @faye.on(:error) { |event| @event_target.on_error(event.message) } - end - end - end -end |