What's Up?

OK, So I've been scripting (Some what) my first Python project, Host.py & Guest.py: Host.py listens for sockets connections on your computer, While Guest.py connects to Host.py and sends some text. Now yesterday a light bulb appeared above my head & I instantly got a thought ''What If two Guest.py script's connect one once?'' Good thing that happened too.

Using normal sockets works in a, First cometh, First serveth manner, So if two connections connect, Any text that's being sent will only go to the first Guest.py connected. Which isn't idle. Apparently using something called " Twisted" is a good move but I don't wanna rewrite most of my script, How can I send text to all the connected Guest.py scripts at once?

See Ya!

Converting to Twisted would be the best option in my opinion.

But using threads might help solve this problem.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.