Changeset 1268


Ignore:
Timestamp:
03/07/06 14:33:14 (13 years ago)
Author:
spascoe
Message:

Added higher level client module which includes API doc strings.

Location:
TI05-delivery/trunk
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • TI05-delivery/trunk/lib/python/delivery/server.py

    r1238 r1268  
    9696     
    9797    def send(self, buffer): 
    98         """Send a message to the client during authorisation. 
    99  
    100         This method must only be used from within self.authorise() which has been called 
     98        """Send a message to the client during authentication 
     99 
     100        This method must only be used from within self.authenticate() which has been called 
    101101        from the bbftp server process started by start(). 
    102102 
     
    107107 
    108108    def recv(self): 
    109         """Receive a message from the client during authorisation. 
    110  
    111         This method must only be used from within self.authorise() which has been called 
     109        """Receive a message from the client during authentication 
     110 
     111        This method must only be used from within self.authenticate() which has been called 
    112112        from the bbftp server process started by start(). 
    113113 
  • TI05-delivery/trunk/test/runclient.py

    r1265 r1268  
    1919sys.path.append(BUILDDIR) 
    2020 
    21 import delivery.bbftpc as BC 
     21import delivery.client as DC 
    2222 
    23  
    24 class AuthClientHandler(object): 
     23class AuthClientHandler(DC.AuthClientHandler): 
    2524    def __init__(self, privatestr="none"): 
    2625        self.privatestr = privatestr 
     
    3130        #print >>sys.stderr, "continueing" 
    3231 
    33         BC.send(NDG_HANDSHAKE) 
    34         resp = BC.recv() 
     32        self.send(NDG_HANDSHAKE) 
     33        resp = self.recv() 
    3534 
    3635        print "Received Auth handshake: %s" % resp 
    3736 
    38         BC.send(self.privatestr) 
     37        self.send(self.privatestr) 
    3938 
    4039        return True 
     
    6665 
    6766print "** runclient.py: connecting" 
    68 msgs = BC.connect(ach, args) 
     67msgs = DC.connect(ach, args) 
    6968for msg in msgs: 
    7069    print msg.rstrip() 
     
    7271for cmd in cmds: 
    7372    print "** runclient.py: doing %s" % cmd 
    74     msgs = BC.docommand(cmd) 
     73    msgs = DC.docommand(cmd) 
    7574    for msg in msgs: 
    7675        print msg.rstrip() 
    77 BC.close() 
     76DC.close() 
Note: See TracChangeset for help on using the changeset viewer.