]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-23554: Change echo server example class name from EchoServerClientProtocol to...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 15 Oct 2018 21:59:49 +0000 (14:59 -0700)
committerGitHub <noreply@github.com>
Mon, 15 Oct 2018 21:59:49 +0000 (14:59 -0700)
(cherry picked from commit 43a5bd7b458f0ad2d62b00b033d025689d48d591)

Co-authored-by: Braden Groom <braden.groom@gmail.com>
Doc/library/asyncio-protocol.rst

index bdfdcf7ddb6efaf5427ee06822b31ecd1d753ca9..f54dece05f3a2f6bcac6d109fe471d118117acbe 100644 (file)
@@ -717,7 +717,7 @@ received data, and close the connection::
     import asyncio
 
 
-    class EchoServerClientProtocol(asyncio.Protocol):
+    class EchoServerProtocol(asyncio.Protocol):
         def connection_made(self, transport):
             peername = transport.get_extra_info('peername')
             print('Connection from {}'.format(peername))
@@ -740,7 +740,7 @@ received data, and close the connection::
         loop = asyncio.get_running_loop()
 
         server = await loop.create_server(
-            lambda: EchoServerClientProtocol(),
+            lambda: EchoServerProtocol(),
             '127.0.0.1', 8888)
 
         async with server: