# vin-socket.client

> This application maintains the light weight of transmision and performance over websocket connection

Latest version **1.1.1** (published 2024-07-07) · ISC license · 0 weekly downloads

## Install

```sh
npm install vin-socket.client
pnpm add vin-socket.client
yarn add vin-socket.client
bun add vin-socket.client
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2024-07-07 |
| First published | 2023-05-17 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 53.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Marvin Petate |
| Maintainers | petatemarvin26 |
| Keywords | Websocket |

## Links

- npm: https://www.npmjs.com/package/vin-socket.client
- Repository: https://github.com/petatemarvin26/vin-socket.client
- Homepage: https://github.com/petatemarvin26/vin-socket.client#readme
- Issues: https://github.com/petatemarvin26/vin-socket.client/issues
- npm.io page: https://npm.io/package/vin-socket.client

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 1.1.1 (latest) — 2024-07-07
- 1.1.0 — 2024-07-02
- 1.0.14 — 2024-02-18
- 1.0.13 — 2023-06-19
- 1.0.12 — 2023-06-18
- 1.0.11 — 2023-06-18
- 1.0.10 — 2023-05-17

## README

## VIN-SOCKET.CLIENT

Is a websocket client side connection that minified the functionalities and strategies of [Websocket][ws] for easy implementation of websocket.

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

#

### Installation

```shell
npm install vin-socket.client
```

#

### Features

- Easy to consume
- Modern approach
- Background digestion as binary

#

### Usage Examples

Connect to Websocket Server

```Javascript
import {SocketClient} from 'vin-socket.client';

// global scope
const socket = new SocketClient('ws://localhost:3200');

const App: React.FC = () => {

  useEffect(() => {
    socket.onConnect(() => {
      // user has been connected
    })
    socket.emit('my:event', {message: 'Hello World'})
  }, [])

  return (
    <div>HELLO WORLD</div>
  )
}

```

> NOTE: We recommend to put the SocketClient instance in global scope or top of the code

#

### 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][github-release] and based on semantic versioning

#

### License

[ISC][license]

[ws]: https://developer.mozilla.org/en-US/docs/Web/API/WebSocket
[nodejs]: https://nodejs.org/en
[github-release]: https://github.com/petatemarvin26/vin-socket.client/releases
[license]: ./LICENSE
[peer-lib]: https://www.npmjs.com/package/vin-socket.server

---
_Source: https://npm.io/package/vin-socket.client · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
