https://github.com/delight-rpc/extra-websocket
🌲
https://github.com/delight-rpc/extra-websocket
esm library nodejs npm-package typescript
Last synced: 3 months ago
JSON representation
🌲
- Host: GitHub
- URL: https://github.com/delight-rpc/extra-websocket
- Owner: delight-rpc
- License: mit
- Created: 2022-05-31T03:08:51.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2026-02-25T15:28:10.000Z (4 months ago)
- Last Synced: 2026-02-25T17:07:00.186Z (4 months ago)
- Topics: esm, library, nodejs, npm-package, typescript
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/@delight-rpc/extra-websocket
- Size: 1.32 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# @delight-rpc/extra-websocket
## Install
```sh
npm install --save @delight-rpc/extra-websocket
# or
yarn add @delight-rpc/extra-websocket
```
## API
### createClient
```ts
function createClient(
socket: ExtraWebSocket
, options?: {
parameterValidators?: DelightRPC.ParameterValidators
expectedVersion?: string
channel?: string
timeout?: number
}
): [client: DelightRPC.ClientProxy, close: () => void]
```
### createBatchClient
```ts
function createBatchClient(
socket: ExtraWebSocket
, options?: {
expectedVersion?: string
channel?: string
timeout?: number
}
): [client: DelightRPC.BatchClient, close: () => void]
```
### createServer
```ts
function createServer(
api: DelightRPC.ImplementationOf
, socket: ExtraWebSocket
, options?: {
loggerLevel?: Level = Level.None
parameterValidators?: DelightRPC.ParameterValidators
version?: `${number}.${number}.${number}`
channel?: string | RegExp | AnyChannel
ownPropsOnly?: boolean
}
): () => void
```