Sha256: 0bca2024517a5e288001ff511d48c905284380239d22d4132a0961e97aecf49f

Contents?: true

Size: 357 Bytes

Versions: 9

Compression:

Stored size: 357 Bytes

Contents

module Faye
  class WebSocket

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

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

      def socket_connection?
        websocket? or eventsource?
      end
    end

  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
faye-websocket-0.7.1 lib/faye/websocket/adapter.rb
faye-websocket-0.7.0 lib/faye/websocket/adapter.rb
faye-websocket-0.6.3 lib/faye/websocket/adapter.rb
faye-websocket-0.6.2 lib/faye/websocket/adapter.rb
faye-websocket-0.6.1 lib/faye/websocket/adapter.rb
faye-websocket-0.6.0 lib/faye/websocket/adapter.rb
faye-websocket-0.5.0 lib/faye/websocket/adapter.rb
faye-websocket-0.4.7-java lib/faye/websocket/adapter.rb
faye-websocket-0.4.7 lib/faye/websocket/adapter.rb