Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/smikodanic/regoch-websocket
Websocket server made in NodeJS and websocket clients for NodeJS, Browser and other platforms.
https://github.com/smikodanic/regoch-websocket
Last synced: 15 days ago
JSON representation
Websocket server made in NodeJS and websocket clients for NodeJS, Browser and other platforms.
- Host: GitHub
- URL: https://github.com/smikodanic/regoch-websocket
- Owner: smikodanic
- License: mit
- Created: 2021-07-24T11:17:15.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-08-17T09:39:50.000Z (over 2 years ago)
- Last Synced: 2024-12-19T13:32:22.403Z (21 days ago)
- Language: JavaScript
- Size: 448 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# regoch-websocket
> Websocket server made in NodeJS and websocket clients for NodeJS and Browser.Small but very powerful, websocket library made according to [RFC6455 Standard](https://www.iana.org/assignments/websocket/websocket.xml).
Current websocket version: *13*
Library parts:
- **[Regoch Websocket Server (NodeJS)](https://github.com/smikodanic/regoch-websocket/tree/master/server)**
- **[Regoch Websocket Client (NodeJS)](https://github.com/smikodanic/regoch-websocket/tree/master/clientNodejs)**
- **[Regoch Websocket Client (Browser)](https://github.com/smikodanic/regoch-websocket/tree/master/clientBrowser)**
- *Regoch Websocket Client (Angular) - ToDo*
- *Regoch Websocket Client (React) - ToDo*
- *Regoch Websocket Client (Vue) - ToDo*
- *Regoch Websocket Client (JAVA) - ToDo*
- *Regoch Websocket Client (C++) - ToDo*## Installation
```bash
npm install --save regoch-websocket
```## Website
Visit the website [www.regoch.org](http://www.regoch.org) for more information !## Websocket Server Features
- websocket version: **13**
- subprotocols: jsonRWS, raw
- chat, rooms
- PING & PONG
- small file size
- very fast and reliable data transfer (use it directly in the "for" loop)
- **no npm dependencies**
- powerful API
- easy RxJS integration## subprotocol "jsonRWS"
Basic subprotocol for message exchange between server & client is the **jsonRWS** © subprotocol. It is the websocket subprotocol invented by the Regoch.org project.*Subprotocol description:*
The subprotocol is created for communication between websocket server and client.*Subprotocol definitons:*
a) Client have to send message in valid JSON format. Fields: **{id:string, from:string, to:string|string[], cmd:string, payload?:any}**
b) Server have to send message in valid JSON format. Fields: **{id:string, from:string, to:string|string[], cmd:string, payload?:any}**
c) The incoming message is converted from string to object.
d) The outgoing message is converted from object to string.
## TCPDUMP
Use *tcpdump* linux command to debug the messages sent from the server to the client.
For example ```sudo tcpdump -i any port 57190 -X -s0``` where 57190 is the client port i.e. **socket.localPort**### Licence
“Freely you received, freely you give”, Matthew 10:5-8Copyright (c) 2020 Saša Mikodanić licensed under [MIT](./LICENSE) .