Commit 680241ec authored by Ezio Melotti's avatar Ezio Melotti

Fix indentation and class name in socket howto example.

parent 80f53aa9
......@@ -180,7 +180,7 @@ righter than others).
Assuming you don't want to end the connection, the simplest solution is a fixed
length message::
class mysocket:
class MySocket:
"""demonstration class only
- coded for clarity, not efficiency
"""
......@@ -189,8 +189,8 @@ length message::
if sock is None:
self.sock = socket.socket(
socket.AF_INET, socket.SOCK_STREAM)
else:
self.sock = sock
else:
self.sock = sock
def connect(self, host, port):
self.sock.connect((host, port))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment