Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
680241ec
Commit
680241ec
authored
Jun 27, 2014
by
Ezio Melotti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix indentation and class name in socket howto example.
parent
80f53aa9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
Doc/howto/sockets.rst
Doc/howto/sockets.rst
+3
-3
No files found.
Doc/howto/sockets.rst
View file @
680241ec
...
...
@@ -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
mys
ocket:
class
MyS
ocket:
"""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))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment