Package driver :: Module network :: Class MasterServer
[show private | hide private]
[frames | no frames]

Class MasterServer

Manager --+
          |
         MasterServer


The MasterServer handles all the incoming network connections and holds a series of Connection objects.
Method Summary
  __init__(self, newengine)
  __repr__(self)
  connect_hook(self, args)
Handles adding the connection to the list of connections we maintain and poll from.
  disconnect_hook(self, args)
Handles disconnects.
  mainloop(self)
The main loop for picking up data off of the master and other socket connections.
  shutdown1_hook(self, args)
Ends the MasterServer network thread.
  shutdown2_hook(self, args)
Flushes and closes all remaining socket connections.
  startup_hook(self, args)
Initializes the MasterServer.
    Inherited from Manager
string getName(self)
Returns the name of this manager.
string getStatus(self)
Returns a one-liner status of the state of this manager.

Method Details

connect_hook(self, args)

Handles adding the connection to the list of connections we maintain and poll from.

disconnect_hook(self, args)

Handles disconnects.

mainloop(self)

The main loop for picking up data off of the master and other socket connections. We then pass things off to hooks to be handled.

shutdown1_hook(self, args)

Ends the MasterServer network thread.

shutdown2_hook(self, args)

Flushes and closes all remaining socket connections. Then we shut down the master socket. This should be done after the rest of the server is shut down so that players get a chance to see what's going on (any messages).

startup_hook(self, args)

Initializes the MasterServer. It'll bind to sockets and do all that other stuff at this point.

Generated by Epydoc 2.0 on Wed Jan 21 21:00:06 2004 http://epydoc.sf.net