WebSockets Chatroom Demo

By Kevin Cuzner


This demo shows the usage of sockets to run a chat server. By using sockets instead of polling, the server instantly reacts to the event of receiving a message from one of the users to echo it back to the other users. To keep it simple, this particular implementation of the chat server does not keep track of message which have been sent; only messages that are being sent. The server itself is written in python and functions by attempting to resolve the endpoint requested with a python script in a directory matching the requested URI relative a Services directory. The server handles distributing clients to their various endpoints, but it is up to the individual services to determine exactly what to do with each client. The javascript on the client side is relatively simple. Using knockoutjs and jQuery the client scripts establish a connection to the server and simply obey its instructions while telling the server about the user's response.

Room name 150
Create New Chatroom
Name
Message
Status
joined the room left the room
Send
Settings
Settings
Save settings
Error:
Please wait: