diff --git a/Doc/library/asyncio-protocol.rst b/Doc/library/asyncio-protocol.rst index 14ec31a6d5d281..5e6b5b480562ad 100644 --- a/Doc/library/asyncio-protocol.rst +++ b/Doc/library/asyncio-protocol.rst @@ -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: