Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shadowtime2000/socket-io-telnet-relay-server
A relay server package to allow telnet clients to connect to a socket.io server
https://github.com/shadowtime2000/socket-io-telnet-relay-server
socket-io socketio tcp tcp-server telnet telnet-client telnet-server
Last synced: 9 days ago
JSON representation
A relay server package to allow telnet clients to connect to a socket.io server
- Host: GitHub
- URL: https://github.com/shadowtime2000/socket-io-telnet-relay-server
- Owner: shadowtime2000
- Created: 2020-07-11T22:08:37.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-07-15T08:44:55.000Z (over 1 year ago)
- Last Synced: 2024-12-11T04:26:32.411Z (2 months ago)
- Topics: socket-io, socketio, tcp, tcp-server, telnet, telnet-client, telnet-server
- Language: JavaScript
- Homepage:
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# socket-io-telnet-relay-server
An npm package for a relay server to connect telnet clients to socket.io servers## Usage
You can install it from npm with:
```
npm install socket-io-telnet-relay-server
```
You can import it with
```javascript
const RelayServer = require("socket-io-telnet-relay-server");
```
You must specify the address of the socket.io server, the event to emit to socket.io by, and the port for the telnet server to run on.
To send data to all telnet clients, you can use the ```allUsers``` event, followed by the data.
To send data to a certain telnet client, you must use the ```user``` event, with the id of the telnet client and the data.
**Warning! The telnet client ids can change extremely quick as soon as a client drops**
When a telnet client sends data, it will use the event you specified when created the RelayServer, with an object containing a ```user``` attribute specifying the id of the user, and a ```data``` attribute which has the data.