mosquittochat is an MQTT protocol based simple Chat Server which can be set up locally to chat in your LAN. It supports both Public Chat among all participants connected simultaneously at a particular time and also Private Chat betweent those individual participants.
It uses the MQTT protocol to implement the real time message passing system. MQTT is implemented in many languages and in many softwares, one of such is Mosquitto , which is a message broker implementing the MQTT protocol.
It first tries to create a Websocket connection, and if it fails then it fallbacks to other transport mechanisms, such as Ajax, long polling, etc. After the connection is established, the tornado server**(sockjs-tornado)** connects to Mosquitto via MQTT protocol using the MQTT Python Client Library, paho-mqtt.
Thus the connection is web-browser to tornado to mosquitto and vice versa.