Skip to content

Commit

Permalink
docs: add documentation in client protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
joamag committed Aug 22, 2021
1 parent d83e0eb commit b6e0774
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions examples/echo/echos_tcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@
import asyncio

class EchoServerClientProtocol(asyncio.Protocol):
"""
Simple protocol implementation for an echo protocol
that writes back the received message through the
response pipeline. This implementation is inspired by
the Python asyncio documentation example.
:see: https://docs.python.org/3.6/library/asyncio-protocol.html#protocol-examples
"""

def connection_made(self, transport):
peername = transport.get_extra_info("peername")
Expand Down

0 comments on commit b6e0774

Please sign in to comment.