Package tangled :: Module server :: Class AsyncHTTPServer
[hide private]
[frames] | no frames]

Class AsyncHTTPServer

source code

asyncore.dispatcher --+
                      |
                     AsyncHTTPServer

Cobbled together from various sources, most of them state that they copied from the Medusa http server..

Instance Methods [hide private]
 
__init__(self, address, context, urlhandlers) source code
 
handle_accept(self) source code

Inherited from asyncore.dispatcher: __getattr__, __repr__, accept, add_channel, bind, close, connect, create_socket, del_channel, handle_close, handle_connect, handle_connect_event, handle_error, handle_expt, handle_expt_event, handle_read, handle_read_event, handle_write, handle_write_event, listen, log, log_info, readable, recv, send, set_reuse_addr, set_socket, writable

Class Variables [hide private]

Inherited from asyncore.dispatcher: accepting, addr, closing, connected, debug, ignore_log_types

Method Details [hide private]

__init__(self, address, context, urlhandlers)
(Constructor)

source code 
Parameters:
  • address - Tuple of address, port
  • context - Something that gets passed to the handler's constructor for each request
  • urlhandlers - list of (regex, handler) tuples.

    A handler needs to have a constructor that accepts the context object, and a do_* method for each HTTP verb it wants to handle.

Overrides: asyncore.dispatcher.__init__

handle_accept(self)

source code 
Overrides: asyncore.dispatcher.handle_accept