File: interface.rb

package info (click to toggle)
libnora-ruby 1%3A0.0.20041021-4
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 408 kB
  • ctags: 726
  • sloc: ruby: 5,186; ansic: 669; makefile: 248; sql: 10
file content (27 lines) | stat: -rwxr-xr-x 725 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Web::Interface
# Copyright(c) 2002 MoonWolf <moonwolf@moonwolf.com>
require 'web/interface/basic'
require 'web/interface/cgi'      #CGI
require 'web/interface/mod_ruby' #mod_ruby
require 'web/interface/fastcgi'  #FastCGI
require 'web/interface/rinda'    #Rinda
require 'web/interface/rubymail' #RubyMail

module Web
  module Interface
    AUTO = 
      if defined?(MOD_RUBY)
        Web::Interface::ModRuby
      else
        begin
          s = Socket.for_fd($stdin.fileno)
          s.getpeername
          Web::Interface::FastCGI
        rescue Errno::ENOTCONN
          Web::Interface::FastCGI
        rescue Errno::ENOTSOCK,Errno::EINVAL
          Web::Interface::CGI
        end
      end
  end # Interface
end # Web