Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ramji023/realtimechat_application


https://github.com/ramji023/realtimechat_application

css html javascript nodejs socket-io

Last synced: 4 days ago
JSON representation

Awesome Lists containing this project

README

        

# RealTimeChat_application
/* In this real-time chat app we create both a client file and a server file.
Multiple clients can connect to the server, and when a client joins the chat,
it emits an event with (socket.emit) Then server handles this event with (socket.io) and broadcasts it with (socket.broadcast.emit) to all the clients.
Similarly, when any client emits an event to the server, the server handles it and broadcasts it to all clients.
And when server emit an event to a client then he handle the event.

Here is the visual presentation how it works : =>
step 1 ==>
suppose a client name Ramji :-> send a message using socket.emit to server
step 2 ==>
server :-> then server receive message from Ramji using socket.io and now
step 3 ==>
server :-> server broadcast the message to all multiple clients using socket.broadcast.emit
step 4 ==>
multiple clients :->now when any clients send any message using socket.emit then
step 5 ==>
server:-> then server emit this message and broadcast to RAmji and all other clients

*/