Skip to content

Commit

Permalink
fix: readme typo
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacek Pietal committed Feb 11, 2022
1 parent 47810c8 commit 73aa5ca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ at the **same port** as the **files server** too. **One** client may be in **man

### STEP 1: Before Connection

- client -> connects websocket to `bouncer` server on `websocket` protocol
- server -> waits for `join` event (which is defined in `config.join`)
- client -> `socket.io-client` connects to `location.origin.replace(/^http/, 'ws')`
- server -> waits for any incoming `config.join` events

### STEP 2: Connection

Expand All @@ -96,7 +96,7 @@ at the **same port** as the **files server** too. **One** client may be in **man
## API

- a plugin is a function `(ws, { id, event, data })` that is called **each time** the frontend websocket emits to server
- context (`this`) of each plugin is the `bouncer` instance.
- context (`this`) of each plugin is the `server` instance.
- plugins receive (and send) the data in the format of:

```ts
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "chef-socket",
"version": "1.0.18",
"version": "1.0.19",
"keywords": [
"chef-js",
"server",
Expand Down

0 comments on commit 73aa5ca

Please sign in to comment.