Coding Projects Python Asyncio

A high-level asyncio server and client

Published · 2min

Life got in the way of me publishing anything for the last month, but I was able to convert uwhoisd to use asyncio. That PR has a lot more in it aside form the code to switch from Tornado to asyncio. Here, I’ll just cover how the echo server …

Coding Projects Python Asyncio

asyncio: an interlude

Published · 3min

Yesterday’s entry contained some issues I didn’t notice until later. The main one is that after the initial successful test, I’d notice that the client would start to disconnect. There’s no explicit timeout on the connections, so this might be either some underlying socket timeout or …

Coding Projects Python Asyncio

A simple asyncio client

Published · 2min

In the last entry, I implemented a ‘chat’-style protocol. Using loop.create_connection(), I can reuse ChatProtocol, but with a different client implementation to allow some interactivity. I’m assuming the server is in the same directory as this file so ChatProtocol can be imported from it.

import asyncio

from …
Coding Projects Python Asyncio

Exploring asyncio protocols

Published · 4min

In the last entry, I managed to get a very basic daemon running. Now I need to flesh out the initial Protocol implementation to first turn it into a proper echo server and then implement a simple parser for a ‘chat’-style protocol.

The first bit is at least easy …

Coding Projects Python Asyncio

Starting with asyncio

Published · 3min

I have an old project called uwhoisd from a previous life. It’s been about eight years since I last did anything significant with it. It’s now largely obsolete owing to the ICANN policy changes partially forced by the GDPR, but I’d like to use it as a …