In this tutorial we'll implement the WebSocket, server side, protocol directly from its RFC specification using the asyncio library.
One of the best ways to learn about asynchronous programming is to implement a network protocol. Being simple to implement, a WebSocket server is an excellent choice for this exercise. In this tutorial we will use Python's asyncio library to write a working WebSocket server using nothing but the protocol's RFC specification.