bedrock-protocol/examples/createClientExample.js
u9g d8ff48258c
Add createClient (#61)
* Initial commit

* remove comment

* export obj

* fix export

* add to api.md

* fix old refs to nmp
2021-04-14 23:39:05 +02:00

9 lines
202 B
JavaScript

const { createClient } = require('bedrock-protocol')
const client = createClient({ hostname: '127.0.0.1' })
let ix = 0
client.on('packet', (args) => {
console.log(`Packet ${ix} recieved`)
ix++
})