1.0.14 • Published 3 months ago

vin-socket.client v1.0.14

Weekly downloads
-
License
ISC
Repository
github
Last release
3 months ago

VIN-SOCKET.CLIENT

Is ES Module, a websocket client side connection that minified the functionalities and strategies of Websocket for easy implementation of websocket.

This module required to install its peer module vin-socket.server to server side in order to work correctly.

Installation

npm install vin-socket.client

Features

  • easy to consume
  • modern approach
  • background digestion into binary data

Usage Examples

Listen to server

const { createServer } = require("http");
const { SocketClient } = require("vin-socket.client");

const wsClient = new SocketClient('ws://localhost:3000');

wsClient.on("res:message", (payload) => {
  console.log(`Received payload from server`, payload)
})

NOTE: We recommend to put the instantiation in top level code

Emit to server

...

wsClient.emit("req:message", {
  message: `Hello server!`
})

Contributing

Unfortunately we are not accepting any contributors yet this is under probitionary, but for your concerns and possible suggestions just email me at petatemarvin26@gmail.com

Changelog

We're using github release and based on semantic versioning

License

ISC

1.0.14

3 months ago

1.0.11

11 months ago

1.0.13

11 months ago

1.0.12

11 months ago

1.0.10

12 months ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago