Answer the question
In order to leave comments, you need to log in
How to make a chat for three or more computers in python socket?
How to make a chat for three or more computers in python socket?
Answer the question
In order to leave comments, you need to log in
Give someone the server role, let him listen for connections and keep a list of already connected clients.
Upon receiving a message from a connected client, you need to forward it to everyone except the sender.
Clients simply listen for messages from the server and display them on the screen.
The alternative is to use broadcast UDP, but a TCP server is more reliable.
I would advise you to deal with asyncio, it can greatly simplify writing a server.
The most difficult thing will be to write the client, as it will be necessary to make asyncio friends with the client's user interface. Even elementary input() will be non-trivial to use.
So you can immediately use qasync to make pyqt and asyncio friends.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question