Python - What should class setup be for UDP/TCP game server listeners?

beavoid used Ask the Experts™
For my Python RTS / MOBA server,

I am at a decision where I should either make a class for reading UDP activity updates from the clients over TCP activity ( a failsafe)
Should I have a UDPlistener class and a TCPlistener class?
or should I have a packetListener class with a UDPlisten method and  also, a TCPlisten method? - that are each made into Threads?
I think an all-in-one approach would make linking into the game smoother?

both would work, but which would look best? Is Python better suited to one?

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Kyle SantosSoftware Test Analyst I at Dassault Systemes


I am following up on your question.  Do you still need help?

If you solved the problem on your own, would you please post the solution here in case others have the same problem?


Kyle Santos
Customer Relations
beavoidSelf Employed


Thanks, I'll check it out tomorrow
Self Employed
Hi, these are the files I ended with :

What you might need for your project will be identifiable in no time. It is a server that uses TCP as a baseline, for safe, certain packet delivery, - with TCP, with UDP and the same packet sent after, for quicker arrival possibilities..
It should be simple to convert it to Python, if needed.
beavoidSelf Employed


Enjoy! Plz comment if you benefited from this post

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial