Nocturnal Pumpkin Maelstrom
Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

@geckos.io/client

1.7.0 • Public • Published
logo

@geckos.io/client

Dependency Status NPM version Downloads Node version Minified bundle Snyk Vulnerabilities for GitHub Repo (Specific Manifest) NPM

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/client

Use

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')
})

Install

npm i @geckos.io/client

DownloadsWeekly Downloads

70

Version

1.7.0

License

BSD-3-Clause

Unpacked Size

50.5 kB

Total Files

22

Homepage

geckos.io

Last publish

Collaborators

  • avatar