From: Andrew M. Kuchling Date: Wed, 9 Aug 2006 14:05:35 +0000 (+0000) Subject: Add missing 'self' parameters X-Git-Tag: v2.5c1~113 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=58aa6f70a1b0c4338c6a6d5484085b8e6d3327c1;p=thirdparty%2FPython%2Fcpython.git Add missing 'self' parameters --- diff --git a/Doc/howto/sockets.tex b/Doc/howto/sockets.tex index 4da92a879e92..0607a933b4d5 100644 --- a/Doc/howto/sockets.tex +++ b/Doc/howto/sockets.tex @@ -222,9 +222,11 @@ is a fixed length message: socket.AF_INET, socket.SOCK_STREAM) else: self.sock = sock - def connect(host, port): + + def connect(self, host, port): self.sock.connect((host, port)) - def mysend(msg): + + def mysend(self, msg): totalsent = 0 while totalsent < MSGLEN: sent = self.sock.send(msg[totalsent:]) @@ -232,7 +234,8 @@ is a fixed length message: raise RuntimeError, \\ "socket connection broken" totalsent = totalsent + sent - def myreceive(): + + def myreceive(self): msg = '' while len(msg) < MSGLEN: chunk = self.sock.recv(MSGLEN-len(msg))