Add createClient (#61)

* Initial commit

* remove comment

* export obj

* fix export

* add to api.md

* fix old refs to nmp
This commit is contained in:
u9g 2021-04-14 17:39:05 -04:00 committed by GitHub
commit d8ff48258c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 72 additions and 1 deletions

View file

@ -0,0 +1,9 @@
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++
})