Module spiroserver :: Class SpiroServer
[show private | hide private]
[frames | no frames]

Class SpiroServer

BaseServer --+        
             |        
     TCPServer --+    
                 |    
ThreadingMixIn --+    
                 |    
ThreadingTCPServer --+
                     |
                    SpiroServer


Server side of SPIRO

When each client connection arrives, this creates an instance of SpiroSession and dispatches it to run the session.
Method Summary
  __init__(self, **kw)
Create the SPIRO server object
  finish_request(self, request, client_address)
Finish one request by instantiating RequestHandlerClass.
  run(self)
Run the SPIRO server.
    Inherited from ThreadingMixIn
  process_request(self, request, client_address)
Start a new thread to process the request.
  process_request_thread(self, request, client_address)
Same as in BaseServer but as a thread.
    Inherited from TCPServer
  close_request(self, request)
Called to clean up an individual request.
  fileno(self)
Return socket file number.
  get_request(self)
Get the request and client address from the socket.
  server_activate(self)
Called by constructor to activate the server.
  server_bind(self)
Called by constructor to bind the socket.
  server_close(self)
Called to clean-up the server.
    Inherited from BaseServer
  handle_error(self, request, client_address)
Handle an error gracefully.
  handle_request(self)
Handle one request, possibly blocking.
  serve_forever(self)
Handle one request at a time until doomsday.
  verify_request(self, request, client_address)
Verify the request.

Class Variable Summary
str host = '127.0.0.1'
list importslist = []
int port = 9091                                                                  
    Inherited from ThreadingMixIn
bool daemon_threads = False
    Inherited from TCPServer
int address_family = 2                                                                     
bool allow_reuse_address = False
int request_queue_size = 5                                                                     
int socket_type = 1                                                                     

Method Details

__init__(self, **kw)
(Constructor)

Create the SPIRO server object

Arguments:
  • none yet
Keywords:
  • host - host to listen on for client conns (default self.host ('127.0.0.1')
  • port - port to listen on for client conns (default self.port (7656)
  • imports - imports to pre-load into each new client namespace
  • logVerbosity - logging verbosity, defaults to global defaultLogVerbosity
  • logFile - file to log to, defaults to defaultLogfile
  • logDelay - delay between logging messages, default 0
Overrides:
SocketServer.TCPServer.__init__

finish_request(self, request, client_address)

Finish one request by instantiating RequestHandlerClass.
Overrides:
SocketServer.BaseServer.finish_request

run(self)

Run the SPIRO server.

when connections come in, they are automatically accepted, and a SpiroReqHandler object created, and its handle method invoked.

Class Variable Details

host

Type:
str
Value:
'127.0.0.1'                                                            

importslist

Type:
list
Value:
[]                                                                     

port

Type:
int
Value:
9091                                                                  

Generated by Epydoc 2.0 on Sun Apr 11 13:37:10 2004 http://epydoc.sf.net