Package cherrypy :: Module _cpserver :: Class Server
[hide private]
[frames] | no frames]

Class Server

source code

                   object --+    
                            |    
process.servers.ServerAdapter --+
                                |
                               Server

An adapter for an HTTP server.

You can set attributes (like socket_host and socket_port)
on *this* object (which is probably cherrypy.server), and call
quickstart. For example:

    cherrypy.server.socket_port = 80
    cherrypy.quickstart()

Instance Methods [hide private]
 
_get_socket_host(self) source code
 
_set_socket_host(self, value) source code
 
__init__(self)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
quickstart(self, server=None)
This does nothing now and will be removed in 3.2.
source code
 
httpserver_from_self(self, httpserver=None)
Return a (httpserver, bind_addr) pair based on self attributes.
source code
 
start(self)
Start the HTTP server.
source code
 
base(self)
Return the base (scheme://host) for this server.
source code

Inherited from process.servers.ServerAdapter: restart, stop, subscribe, unsubscribe, wait

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  socket_port = 8080
  _socket_host = '127.0.0.1'
  socket_file = ''
  socket_queue_size = 5
  socket_timeout = 10
  shutdown_timeout = 5
  protocol_version = 'HTTP/1.1'
  reverse_dns = False
  thread_pool = 10
  thread_pool_max = -1
  max_request_header_size = 512000
  max_request_body_size = 104857600
  instance = None
hash(x)
  ssl_certificate = None
hash(x)
  ssl_private_key = None
hash(x)
  nodelay = True
Properties [hide private]
  socket_host
The hostname or IP address on which to listen for connections.

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

start(self)

source code 

Start the HTTP server.

Overrides: process.servers.ServerAdapter.start

Property Details [hide private]

socket_host

The hostname or IP address on which to listen for connections.

Host values may be any IPv4 or IPv6 address, or any valid hostname. The string 'localhost' is a synonym for '127.0.0.1' (or '::1', if your hosts file prefers IPv6). The string '0.0.0.0' is a special IPv4 entry meaning "any active interface" (INADDR_ANY), and '::' is the similar IN6ADDR_ANY for IPv6. The empty string or None are not allowed.

Get Method:
_get_socket_host(self)
Set Method:
_set_socket_host(self, value)