diff options
author | Andrew M. Kuchling <amk@amk.ca> | 2006-08-09 14:05:35 (GMT) |
---|---|---|
committer | Andrew M. Kuchling <amk@amk.ca> | 2006-08-09 14:05:35 (GMT) |
commit | 58aa6f70a1b0c4338c6a6d5484085b8e6d3327c1 (patch) | |
tree | a4a8a806a33c4f3847b206a5b32393b1e1c78f5c /Doc/howto/sockets.tex | |
parent | 13300f2bfa4798632abc96bd3bb3ddf0e1b602f8 (diff) | |
download | cpython-58aa6f70a1b0c4338c6a6d5484085b8e6d3327c1.zip cpython-58aa6f70a1b0c4338c6a6d5484085b8e6d3327c1.tar.gz cpython-58aa6f70a1b0c4338c6a6d5484085b8e6d3327c1.tar.bz2 |
Add missing 'self' parameters
Diffstat (limited to 'Doc/howto/sockets.tex')
-rw-r--r-- | Doc/howto/sockets.tex | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Doc/howto/sockets.tex b/Doc/howto/sockets.tex index 4da92a8..0607a93 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)) |