This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
import argparse | |
import functools | |
import uuid | |
import aiohttp.web | |
import asyncpg | |
import uvloop | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
import ssl | |
async def handle_echo(reader, writer): | |
data = await reader.read(100) | |
message = data.decode() | |
addr = writer.get_extra_info('peername') | |
print("Received %r from %r" % (message, addr)) | |
print("Send: %r" % message) |