1.0.6 • Published 6 years ago
tmtwsrelay v1.0.6
WS TMT Relay
Multiple clients can connect to this WebSockets.io server. Whenever a message is sent to the server by a client, every other client gets the message. Relay
New Features!
Rooms
Install
npm install -g tmtwsrelay
Start
The default port used is 8124
tmtwsrelay [port]
Write Your client
Writing your own client with socket.io
<script src="socket.io-client/dist/socket.io.js"></script>
<script>
var room = 1;
var socket = io.connect('ws://localhost:1234',{
'query':{'room':room}
});
</script>
if you want connect without room, you can connect without query attribute and every client will connect in same room ( room 0 )