bedrock-protocol/examples/createClientExample.js
2021-04-23 03:23:43 -04:00

9 lines
198 B
JavaScript

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