This section assumes Python ≥ 3.5. For older versions, read below. Here’s a WebSocket server example. It reads a name from the client, sends a greeting, and closes the connection. async and await aren ...