Using Python Socket Programming and Multithreaded Server
You are required to build a chat server which includes the following components:
One-to-One Chat Facility
Whenever a user connects to the server, it should display a list of online users (User IDs).
Here, the user will choose a User ID for themselves, which can only be assigned if it has not been assigned earlier. To connect to the chat room, the user would type "room", and for a specific user, they would type "USER ID". Room connection would be granted without any authentication.
For a specific user (Omer), if there is a connection request from "Tehreem", Omer should receive a message like "Tehreem wants to chat with you." Here, Omer should be able to receive this message even if he is in the chat room or talking to some other user (Saad).
Replying "OK" would create a connection with Tehreem.
By replying "SORRY", Omer would continue with the current chat and Tehreem should receive a denial message, "Omer doesn't want to talk to you."
You need to decide the implementation details yourself. For example, which connection (TCP/UDP) you would be using or if there is any threading involved at some point.