# @remixproject/plugin-ws

> This library is a connector that connects a node server to using the `ws` library to the engine.

Latest version **0.3.38** (published 2023-06-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install @remixproject/plugin-ws
pnpm add @remixproject/plugin-ws
yarn add @remixproject/plugin-ws
bun add @remixproject/plugin-ws
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.3.38 |
| Published | 2023-06-26 |
| First published | 2019-10-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 7.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 188 |
| Author | GrandSchtroumpf |
| Maintainers | grandschtroumpf, yann300, lianahus, aniket-engg, bunsenstraat, ioedeveloper |

## Links

- npm: https://www.npmjs.com/package/@remixproject/plugin-ws
- Repository: https://github.com/ethereum/remix-plugin
- Homepage: https://github.com/ethereum/remix-plugin/tree/master/packages/plugin/ws#readme
- Issues: https://github.com/ethereum/remix-plugin/issues
- npm.io page: https://npm.io/package/@remixproject/plugin-ws

## Dependencies (3)

- [@remixproject/plugin](https://npm.io/package/@remixproject/plugin.md) 0.3.38
- [@remixproject/plugin-api](https://npm.io/package/@remixproject/plugin-api.md) 0.3.38
- [@remixproject/plugin-utils](https://npm.io/package/@remixproject/plugin-utils.md) 0.3.38

## Recent versions

- 0.3.38 (latest) — 2023-06-26
- 0.3.44 (next) — 2024-12-19
- 0.3.11-alpha.5 (canary) — 2021-04-01
- 0.3.43 — 2024-03-06
- 0.3.42 — 2023-12-09
- 0.3.41 — 2023-12-09
- 0.3.40 — 2023-12-08
- 0.3.39 — 2023-12-08
- 0.3.37 — 2023-06-07
- 0.3.36 — 2023-06-07
- 0.3.35 — 2023-06-07
- 0.3.34 — 2023-06-02
- 0.3.33 — 2023-02-14
- 0.3.32-alpha — 2023-02-13
- 0.3.31 — 2022-07-11
- … 92 more at https://npm.io/package/@remixproject/plugin-ws/versions

## README

# Plugin ws
This library is a connector that connects a node server to using the `ws` library to the engine.

If you do not expose any API you can create an instance like this :
```typescript
const wss = new WebSocket.Server({ port: 8080 });
wss.on('connection', (ws) => {
  const client = createClient(ws)
})
```

If you need to expose an API to other plugin you need to extends the class: 
```typescript
class MyPlugin extends PluginClient {
 methods = ['hello']
 hello() {
  console.log('Hello World')
 }
}
const wss = new WebSocket.Server({ port: 8080 });
wss.on('connection', (ws) => {
 const client = createClient(ws, new MyPlugin())
})
```

---
_Source: https://npm.io/package/@remixproject/plugin-ws · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
