trollbox-headers
v0.0.4
Published
Headers To Connect To Windows93 Trollbox Server
Downloads
30
Maintainers
Readme
trollbox-headers
A Simple Package With Headers to Connect In Windows93 Trollbox Server
- Install the Package
- Use it with socket.io
- And you done!
Installation
$ npm install trollbox-headers
Example
var io = require('socket.io-client')
var tbheaders = require('trollbox-headers').headers()
const socket = io('http://www.windows93.net:8081', tbheaders)
socket.on('_connected', function(data){ // and once we're connected...
socket.emit('user joined', 'examplebot', "#00ff00","","","") // ...our bot can join!
})
socket.on('message', function(data) {
if (data.msg == "ping") {socket.send('Pong!')}
})