8000 gh-112020: socketserver: Add an example for keeping the connection open by talcs · Pull Request #112054 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-112020: socketserver: Add an example for keeping the connection open #112054

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 8 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
solved conflicts
  • Loading branch information
talcs authored Feb 20, 2024
commit 93c7d86fa487e35123489ae930de4a9e76c88edf
4 changes: 2 additions & 2 deletions Doc/library/socketserver.rst
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ This is the server side::
# Client has hung up
break
self.data = self.data.strip()
print("{} wrote:".format(self.client_address[0]))
print("Received from {}:".format(self.client_address[0]))
print(self.data)
# just send back the same data, but upper-cased
self.request.sendall(self.data.upper())
Expand Down Expand Up @@ -527,7 +527,7 @@ objects that simplify communication by providing the standard file interface)::
# Client has hung up
break
self.data = self.data.strip()
print("{} wrote:".format(self.client_address[0]))
print("Received from {}:".format(self.client_address[0]))
print(self.data)
# Likewise, self.wfile is a file-like object used to write back
# to the client
Expand Down
0