Package Exports
- @geckos.io/client
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@geckos.io/client) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@geckos.io/client
Real-time client/server communication over UDP using WebRTC and Node.js.
This framework fits perfectly with your next HTML5 real-time multiplayer games or chat app.
Read the documentation for more information.
Install
npm install @geckos.io/clientUse
import geckos from '@geckos.io/client'
// or add a minified version to your index.html file
// https://github.com/geckosio/geckos.io/tree/master/bundles/versions
const channel = geckos()
channel.onConnect(error => {
if (error) {
console.error(error.message)
return
}
channel.on('chat message', data => {
console.log(`You got the message ${data}`)
})
channel.emit('chat message', 'a short message sent to the server')
})