Skip to content

Latest commit

 

History

History
20 lines (14 loc) · 382 Bytes

README.md

File metadata and controls

20 lines (14 loc) · 382 Bytes

spacebro2-client

Example connection

'use strict'

const client = require('spacebro2-client')

client.setup({ name: 'client-name' })

client.on('image-event', (data, from) => {
  console.log(`received ${data} from ${from}`)
})

setTimeout(() => {
  client.emit('test-event', 'hello world')
  client.emit('sendto-event', 'hello again', 'other-client-name')
}, 2000)