This has already been written, just not in Python. Take a look at enet, RakNet, or UDT. The various variables that will be in play here are your need for congestion control, whether or not you can live with out-of-order message delivery, and if you have any need for security on the channel. jim