A sockJS based Chat-Server/Chat-System primary using the SockJS protocol.
Details
- Author:
Anirban Roy Das
- Email:
- Copyright(C):
2016, Anirban Roy Das <anirban.nick@gmail.com>
Check sockjsChat/LICENSE file for full Copyright notice.
Overview
sockjsChat is a very basic 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 particulartime and also Private Chat between those individual participants.
It uses the sockjs protocol to implement the real time message passing system. SockJS is implemented in many languages, primarily javascript to talk to servers in real time using its protocol, which tries to create a duplex bi-directional connectin between the Client(browser) and the Server. The server should also implement the sockjs protocol. Thus, using the sockjs-tornado library which exposes the sockjs protocol in tornado server. 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.
You can read more about sockjs here
Technical Specs
- sockjs-client:
Advance Websocket Javascript Client
- Tornado:
async python web server
- sockjs-tornado:
sockjs websocket server implementation for Tornado
Installation
Prerequisites
python 2.7+
tornado
sockjs-tornado
sockjs-client
Install
pip install sockjsChat
If the above dependencies do not get installed by the above command, then use the below steps to install them one by one.
Step 1 - Install pip
Follow the below methods for installing pip. One of them may help you to install pip in your system.
Method 1 - https://pip.pypa.io/en/stable/installing/
Method 3 - If you installed python on MAC OS X via brew install python, then pip is already installed along with python.
Step 2 - Install tornado
pip install tornadoStep 3 - Install sockjs-tornado
pip install sockjs-tornado
Usage
After having installed sockjsChat, just run the following command to use it :
Start Server
$ sockjsChat [options]
Options
- –port:
Port number where the chat server will start
Example
$ sockjsChat --port=8765
Stop Server
Click Ctrl+C to stop the server.
TODO
Add Private Chat functionality.
Manage Presence Management, sent, delivered acknowledgements.
Message Persistence and delivery of messages to offline clients.
Add Blog post regarding this topic.
Release files for sockjsChat 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| sockjsChat-1.1.0.tar.gz | 26.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sockjsChat-1.1.0-py2-none-any.whl | Python 2 | none | any | Details |
Total release size: 54.8 kB
Release files / sockjsChat-1.1.0.tar.gz
| Download URL | sockjsChat-1.1.0.tar.gz |
|---|---|
| Size | 26.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
adaf649ad3ef6e83509e5abc584d8db7a559e3a89ae5d1aae7133bc3eee29c7e
|
|
BLAKE2b-256 checksum How to use checksums |
00a998b82e23bf2a55a577ae888123a8754713f3ea61592cf20317af6d3437c2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / sockjsChat-1.1.0-py2-none-any.whl
| Download URL | sockjsChat-1.1.0-py2-none-any.whl |
|---|---|
| Size | 28.5 kB |
| Tags | Python 2 |
|
SHA-256 checksum How to use checksums |
8778fe140f81528b661d268f5d78326e766cfa8ffaefed489711193a09bf1afb
|
|
BLAKE2b-256 checksum How to use checksums |
a3fa041aa0759a4887bf4d59143648eb715725c9a68137d708447d17599f3333
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |