Sha256: fb6eb4ed31685767b49902095d922fb8526adbac6e4374c88cdfedae723c9c71

Contents?: true

Size: 499 Bytes

Versions: 9

Compression:

Stored size: 499 Bytes

Contents

module Rack
  module WebSocket
    module Handler

      autoload :Base, "#{ROOT_PATH}/websocket/handler/base"
      autoload :Stub, "#{ROOT_PATH}/websocket/handler/stub"
      autoload :Thin, "#{ROOT_PATH}/websocket/handler/thin"

      # Detect current server using software Rack string
      def self.detect(env)
        server_software = env['SERVER_SOFTWARE']
        if server_software.match(/\Athin /i)
          Thin
        else
          Stub
        end
      end
      
    end
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
websocket-rack-noodles-0.4.3 lib/rack/websocket/handler.rb
websocket-rack-noodles-0.4.2 lib/rack/websocket/handler.rb
websocket-rack-noodles-0.4.1 lib/rack/websocket/handler.rb
websocket-rack-noodles-0.4.0 lib/rack/websocket/handler.rb
websocket-rack-0.4.0 lib/rack/websocket/handler.rb
websocket-rack-0.3.3 lib/rack/websocket/handler.rb
websocket-rack-0.3.2 lib/rack/websocket/handler.rb
websocket-rack-0.3.1 lib/rack/websocket/handler.rb
websocket-rack-0.3.0 lib/rack/websocket/handler.rb