bpo-23554: Change echo server example class name from EchoServerClientProtocol to EchoServerProtocol (GH-9859)

(cherry picked from commit 43a5bd7b45)

Co-authored-by: Braden Groom <braden.groom@gmail.com>
This commit is contained in:
Miss Islington (bot) 2018-10-15 14:59:49 -07:00 committed by GitHub
parent fcea3ddc4a
commit 802de12d99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View 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: