Socket
Socket
Sign inDemoInstall

@geckos.io/client

Package Overview
Dependencies
2
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @geckos.io/client

Real-time client/server communication over UDP using WebRTC and Node.js


Version published
Weekly downloads
92
decreased by-31.34%
Maintainers
1
Created
Weekly downloads
 

Readme

Source
logo

@geckos.io/client

NPM version Downloads Node version Minified bundle Snyk Vulnerabilities for GitHub Repo (Specific Manifest) NPM Codecov ES Modules Badge

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

Keywords

FAQs

Last updated on 21 Apr 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc