Sha256: 8f17428742bc5bb61f2d4abaedfd0c2f20599714fad6dc215b076ced31588240

Contents?: true

Size: 367 Bytes

Versions: 23

Compression:

Stored size: 367 Bytes

Contents

module Faye
  class WebSocket

    module Adapter
      def websocket?
        e = defined?(@env) ? @env : env
        e && WebSocket.websocket?(e)
      end

      def eventsource?
        e = defined?(@env) ? @env : env
        e && EventSource.eventsource?(e)
      end

      def socket_connection?
        websocket? or eventsource?
      end
    end

  end
end

Version data entries

23 entries across 23 versions & 2 rubygems

Version Path
faye-websocket-0.11.3 lib/faye/websocket/adapter.rb
faye-websocket-0.11.2 lib/faye/websocket/adapter.rb
faye-websocket-0.11.1 lib/faye/websocket/adapter.rb
faye-websocket-0.11.0 lib/faye/websocket/adapter.rb
faye-websocket-0.10.9 lib/faye/websocket/adapter.rb
faye-websocket-0.10.8 lib/faye/websocket/adapter.rb
faye-websocket-0.10.7 lib/faye/websocket/adapter.rb
faye-websocket-0.10.6 lib/faye/websocket/adapter.rb
faye-websocket-0.10.5 lib/faye/websocket/adapter.rb
faye-websocket-0.10.4 lib/faye/websocket/adapter.rb
faye-websocket-0.10.3 lib/faye/websocket/adapter.rb
faye-websocket-0.10.2 lib/faye/websocket/adapter.rb
faye-websocket-0.10.1 lib/faye/websocket/adapter.rb
faye-websocket-0.10.0 lib/faye/websocket/adapter.rb
faye-websocket-0.9.2 lib/faye/websocket/adapter.rb
faye-websocket-0.9.1 lib/faye/websocket/adapter.rb
faye-websocket-0.9.0 lib/faye/websocket/adapter.rb
faye-websocket-0.8.0 lib/faye/websocket/adapter.rb
faye-websocket-0.7.5 lib/faye/websocket/adapter.rb
faye-websocket-0.7.4 lib/faye/websocket/adapter.rb