diff options
author | Guido van Rossum <guido@python.org> | 1993-12-17 14:32:26 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1993-12-17 14:32:26 (GMT) |
commit | 9e80d6f12512803532aed39a0335e6346b77abf4 (patch) | |
tree | cf895d035b8a2d89574e565e0384e72f5635325e /Demo/rpc/rnusersclient.py | |
parent | 7565b934144012f25e8b22d888572c048f0eb21a (diff) | |
download | cpython-9e80d6f12512803532aed39a0335e6346b77abf4.zip cpython-9e80d6f12512803532aed39a0335e6346b77abf4.tar.gz cpython-9e80d6f12512803532aed39a0335e6346b77abf4.tar.bz2 |
*** empty log message ***
Diffstat (limited to 'Demo/rpc/rnusersclient.py')
-rw-r--r-- | Demo/rpc/rnusersclient.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Demo/rpc/rnusersclient.py b/Demo/rpc/rnusersclient.py index 4d540f8..e9cad62 100644 --- a/Demo/rpc/rnusersclient.py +++ b/Demo/rpc/rnusersclient.py @@ -37,8 +37,8 @@ class RnusersUnpacker(Unpacker): class PartialRnusersClient: def addpackers(self): - self.packer = RnusersPacker().init() - self.unpacker = RnusersUnpacker().init('') + self.packer = RnusersPacker() + self.unpacker = RnusersUnpacker('') def Num(self): return self.make_call(1, None, None, self.unpacker.unpack_int) @@ -54,14 +54,14 @@ class PartialRnusersClient: class RnusersClient(PartialRnusersClient, UDPClient): - def init(self, host): - return UDPClient.init(self, host, 100002, 2) + def __init__(self, host): + UDPClient.__init__(self, host, 100002, 2) class BroadcastRnusersClient(PartialRnusersClient, BroadcastUDPClient): - def init(self, bcastaddr): - return BroadcastUDPClient.init(self, bcastaddr, 100002, 2) + def __init__(self, bcastaddr): + BroadcastUDPClient.__init__(self, bcastaddr, 100002, 2) def test(): @@ -71,7 +71,7 @@ def test(): return else: host = sys.argv[1] - c = RnusersClient().init(host) + c = RnusersClient(host) list = c.Names() for (line, name, host, time), idle in list: line = strip0(line) @@ -80,7 +80,7 @@ def test(): print `name`, `host`, `line`, time, idle def testbcast(): - c = BroadcastRnusersClient().init('<broadcast>') + c = BroadcastRnusersClient('<broadcast>') def listit(list, fromaddr): host, port = fromaddr print host + '\t:', |