]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-23554: Change echo server example class name from EchoServerClientProtocol to...
authorBraden Groom <braden.groom@gmail.com>
Mon, 15 Oct 2018 21:39:16 +0000 (14:39 -0700)
committerYury Selivanov <yury@magic.io>
Mon, 15 Oct 2018 21:39:16 +0000 (17:39 -0400)
Doc/library/asyncio-protocol.rst

index 14ec31a6d5d28162076723fd28de686220b52f72..5e6b5b480562add1f3205dc6b02af661df672557 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: