Here is something to play around with. It should give you some ideas. It is a work in progress, so don’t expect it to be perfect. I pulled it from a project I’m working on, so some of the code may not be relevant, but I tried to remove what I could to make it more focused on the server listening and client connections. The threading is not really great compared to, say, the TCPMessaging module, which has a much more robust way of implementing threads, but it should be fine for a simple TCP server that can support a few client connections. More info is in the README, Anyway… hope it helps. K-BOB