]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Add missing 'self' parameters
authorAndrew M. Kuchling <amk@amk.ca>
Wed, 9 Aug 2006 14:05:35 +0000 (14:05 +0000)
committerAndrew M. Kuchling <amk@amk.ca>
Wed, 9 Aug 2006 14:05:35 +0000 (14:05 +0000)
Doc/howto/sockets.tex

index 4da92a879e924affb2db6a38c7b17c786bc11913..0607a933b4d559a892906ee1ee85b67a3a5b571a 100644 (file)
@@ -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))