Package pygsear :: Module Network :: Class TwoPlayerConnection
[show private | hide private]
[frames | no frames]

Class TwoPlayerConnection

Jellyable --+            
            |            
 Serializable --+        
                |        
    Referenceable --+    
                    |    
                 Root --+
                        |
    Jellyable --+       |
                |       |
     Serializable --+   |
                    |   |
        Referenceable --+
                        |
                       TwoPlayerConnection


Simple two player network connector

First tries to connect to an existing server, and if none is found, will then wait for an incoming connection.
Method Summary
  __init__(self, game)
  getStateFor(self, jellier)
(inherited from Jellyable)
  got_connection(self, connection)
Client gets server's connection.
  gotNoObject(self, reason)
If no server answers, then start one.
  gotObject(self, connection)
If server exists, and contact is made.
  jellyFor(self, jellier)
(internal) (inherited from Referenceable)
  makeConnection(self)
Try to connect to an existing server.
  processUniqueID(self)
Return an ID which uniquely represents this object for this process. (inherited from Serializable)
  remote_give_connection(self, connection)
Server gets client's Connection, and returns it's own Connection to client.
  remoteMessageReceived(self, broker, message, args, kw)
A remote message has been received. (inherited from Referenceable)
  rootObject(self, broker)
A pb.BrokerFactoryis requesting to publish me as a root object. (inherited from Root)
  startListening(self)
Start a server, and wait for a connection attempt.

Method Details

got_connection(self, connection)

Client gets server's connection.

gotNoObject(self, reason)

If no server answers, then start one.

gotObject(self, connection)

If server exists, and contact is made.

makeConnection(self)

Try to connect to an existing server.

remote_give_connection(self, connection)

Server gets client's Connection, and returns it's own Connection to client.

startListening(self)

Start a server, and wait for a connection attempt.

Generated by Epydoc 1.1 on Sun Nov 30 19:33:14 2003 http://epydoc.sf.net