New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@pouchlab/realtor

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pouchlab/realtor

a blazing fast socket.io alternative,pure websockets

latest
Source
npmnpm
Version
2.0.2
Version published
Maintainers
1
Created
Source

pouchrealtor

blazing fast socket.io alternative,pure websockets.

its a pure websocket for nodejs and browser,draws inspiration from socket.io.if you know socket.io you already know pouchrealtor

features

  • pure websockets
  • blazing fast
  • works in nodejs and browser
  • easy rooms logic

install

 npm install @pouchlab/realtor

server usage

 import {Realtor} from '@pouchlab/realtor';
import express from 'express';
 //with express
 const app = express()

 const realtime = new Realtor({server:app})//expects object
 console.log(realtime)

 //room
 let chatroom = new realtime.Room('/chat')
 console.log(chatroom)

 //events
 chatroom.emit('welcome',{msg:'hi from server'},(res)=>{
    console.log(res)
 })
 chatroom.on('welcome',(socket)=>{
    console.log(socket)
 })


 app.listen(3000)

client usage

 import {CreateClient} from '@pouchlab/realtor';

let client = createClient('ws://localhost:3000/chat')//ws or wss only
 //events
 client.emit('welcome',{msg:'hi from server'},(res)=>{
    console.log(res)
 })
 client.on('welcome',(res)=>{
    console.log(res)
 })

support

if you like pouchrealtor,help maintain its development,this keeps the maintainer motivated

donate ko-fi

Keywords

realtime,ws,sync,pub sub,websocket,socket.io,realtorjs

FAQs

Package last updated on 09 Sep 2024

Did you know?

Socket

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