| Home | Trees | Indices | Help |
|
|---|
|
|
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()
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Inherited from Inherited from Inherited from |
|||
|
|||
socket_port = 8080The TCP port on which to listen for connections. |
|||
_socket_host =
|
|||
socket_file = NoneIf given, the name of the UNIX socket to use instead of TCP/IP. |
|||
socket_queue_size = 5The 'backlog' argument to socket.listen(); specifies the maximum number of queued connections (default 5). |
|||
socket_timeout = 10The timeout in seconds for accepted connections (default 10). |
|||
accepted_queue_size = -1The maximum number of requests which will be queued up before the server refuses to accept it (default -1, meaning no limit). |
|||
accepted_queue_timeout = 10The timeout in seconds for attempting to add a request to the queue when the queue is full (default 10). |
|||
shutdown_timeout = 5The time to wait for HTTP worker threads to clean up. |
|||
protocol_version = The version string to write in the Status-Line of all HTTP responses, for example, "HTTP/1.1" (the default). |
|||
thread_pool = 10The number of worker threads to start up in the pool. |
|||
thread_pool_max = -1The maximum size of the worker-thread pool. |
|||
max_request_header_size = 512000The maximum number of bytes allowable in the request headers. |
|||
max_request_body_size = 104857600The maximum number of bytes allowable in the request body. |
|||
instance = NoneIf not None, this should be an HTTP server instance (such as CPWSGIServer) which cherrypy.server will control. |
|||
ssl_context = NoneWhen using PyOpenSSL, an instance of SSL.Context. |
|||
ssl_certificate = NoneThe filename of the SSL certificate to use. |
|||
ssl_certificate_chain = NoneWhen using PyOpenSSL, the certificate chain to pass to Context.load_verify_locations. |
|||
ssl_private_key = NoneThe filename of the private key to use with SSL. |
|||
ssl_module = The name of a registered SSL adaptation module to use with the builtin WSGI server. |
|||
statistics = FalseTurns statistics-gathering on or off for aware HTTP servers. |
|||
nodelay = TrueIf True (the default since 3.1), sets the TCP_NODELAY socket option. |
|||
wsgi_version = The WSGI version tuple to use with the builtin WSGI server. |
|||
|
|||
|
socket_host The hostname or IP address on which to listen for connections. |
|||
|
bind_addr A (host, port) tuple for TCP sockets or a str for Unix domain sockets. |
|||
|
Inherited from |
|||
|
|||
x.__init__(...) initializes x; see help(type(x)) for signature
|
Start the HTTP server.
|
|
|||
socket_fileIf given, the name of the UNIX socket to use instead of TCP/IP. When this option is not None, the `socket_host` and `socket_port` options are ignored.
|
protocol_versionThe version string to write in the Status-Line of all HTTP responses, for example, "HTTP/1.1" (the default). Depending on the HTTP server used, this should also limit the supported features used in the response.
|
thread_pool_maxThe maximum size of the worker-thread pool. Use -1 to indicate no limit.
|
max_request_header_sizeThe maximum number of bytes allowable in the request headers. If exceeded, the HTTP server should return "413 Request Entity Too Large".
|
max_request_body_sizeThe maximum number of bytes allowable in the request body. If exceeded, the HTTP server should return "413 Request Entity Too Large".
|
instanceIf not None, this should be an HTTP server instance (such as CPWSGIServer) which cherrypy.server will control. Use this when you need more control over object instantiation than is available in the various configuration options.
|
ssl_moduleThe name of a registered SSL adaptation module to use with the builtin WSGI server. Builtin options are 'builtin' (to use the SSL library built into recent versions of Python) and 'pyopenssl' (to use the PyOpenSSL project, which you must install separately). You may also register your own classes in the wsgiserver.ssl_adapters dict.
|
wsgi_versionThe WSGI version tuple to use with the builtin WSGI server. The provided options are (1, 0) [which includes support for PEP 3333, which declares it covers WSGI version 1.0.1 but still mandates the wsgi.version (1, 0)] and ('u', 0), an experimental unicode version. You may create and register your own experimental versions of the WSGI protocol by adding custom classes to the wsgiserver.wsgi_gateways dict.
|
|
|||
socket_hostThe 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.
|
bind_addrA (host, port) tuple for TCP sockets or a str for Unix domain sockets.
|
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Tue Dec 2 09:59:36 2014 | http://epydoc.sourceforge.net |