I've been learning about Python socket, http request/reponse handling these days, I'm still very novice to server programming, I have a question regarding to the fundamental idea behind chatting website.
In chatting website, like Omegle or Facebook's chat, how do 2 guys talk to each other? Do sockets on their own computers directly connect to each other, OR... guy A send a message to the web server, and server send this message to guy B, and vice versa?
Because in the first scenario, both users can retrieve each other's IP, and in the second scenario, since you are connecting to a server, you can not.. right?
Thanks a lot to clear this confusion for me, I'm very new and I really appreciate any help from you guys!
Most chats will use a push notification system.  It will keep track of people within a chat, and as it receives a new message to the chat, it will push it to all the people currently in it.  This protects the users from seeing each other.
the idea behind chat website