Socket
Book a DemoInstallSign in
Socket

@3kles/3kles-socketio

Package Overview
Dependencies
Maintainers
4
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@3kles/3kles-socketio

Socket IO lib

2.1.8
latest
Source
npmnpm
Version published
Maintainers
4
Created
Source

@3kles/3kles-socketio

This package contains class to create sockets

Models

IGenericMessage is a model to represent the message exchanged

  • type?: string: Type of the message
  • to?: string: Specify to who you want to send the message
  • room?: string: Specific room where to send to the message
  • content: any: Content of the message

Interfaces

IGenericSocket is a generic socket interface

  • start(): Promise<void>: To initialize the connections
  • getUsers(): Map<string, any>: To get the users connected
  • addListener(listener?: { event: string, listener: (...args: any[]) => void }): void: To add a listener

Install

npm

npm install @3kles/3kles-socketio --save

How to use

How to create a socket

const broker = await MessageBroker.getInstance();

const app = new GenericApp();
const server = app.startApp();
const genericSocket = new GenericSocket(broker, server);
await genericSocket.start();

Check the documentation here.

Keywords

3KLES

FAQs

Package last updated on 07 Jul 2025

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

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.