Trees | Index | Help |
---|
Package shttp :: Module http :: Class HTTPServer |
|
BaseServer
--+ |TCPServer
--+ |HTTPServer
--+ |BaseServer
--+ | | |TCPServer
--+ | | |ThreadingMixIn
--+ | | |ThreadingTCPServer
--+ | HTTPServer
Method Summary | |
---|---|
__init__(self,
server_address,
HandlerClass,
ssl_privatekey_file,
ssl_certificate_file,
ssl_method,
cgi_handlers,
cgi_directories,
document_root)
| |
close(self)
| |
helloworld(self,
httpreq,
environment)
| |
Process one request, overloaded to support implement trusted SSL under heavy load | |
Register uri |uri| to be handled a function... | |
Set an urihandler... | |
regobj(self,
uri)
| |
Handles requestgs while self.process_next_request is True | |
Deletes the uri-handler associated to |uri| | |
Inherited from ThreadingMixIn | |
Same as in BaseServer but as a thread. | |
Inherited from HTTPServer | |
Override server_bind to store the server name. | |
Inherited from TCPServer | |
Called to clean up an individual request. | |
Return socket file number. | |
Get the request and client address from the socket. | |
Called by constructor to activate the server. | |
Called to clean-up the server. | |
Inherited from BaseServer | |
Finish one request by instantiating RequestHandlerClass. | |
Handle an error gracefully. | |
Handle one request, possibly blocking. | |
Verify the request. |
Class Variable Summary | |
---|---|
Inherited from ThreadingMixIn | |
bool |
daemon_threads = False
|
Inherited from HTTPServer | |
int |
allow_reuse_address = 1 |
Inherited from TCPServer | |
int |
address_family = 2 |
int |
request_queue_size = 5 |
int |
socket_type = 1 |
Method Details |
---|
process_request(self, request, client_address)Process one request, overloaded to support implement trusted SSL under heavy load
|
regcall(self, uri, returntype='text/plain')Register uri |uri| to be handled a function This method can be used safelly as decorator Example @httpobj.regcall('/selected-uri','text/html') def square(x): int(x) return x*x |
register_urihandler(self, uri, handler)Set an urihandler |uri| The URI to be handled |handler| a function that handles the event Prototype: function(httpreq, environment) httpreq is an HTTPRequestHandler Object |
serve_forever(self)Handles requestgs while self.process_next_request is True
|
unregister_urihandler(self, uri)Deletes the uri-handler associated to |uri| |
Trees | Index | Help |
---|
Generated by Epydoc 2.1 on Sat Oct 14 11:50:52 2006 | http://epydoc.sf.net |