Skip to content

Commit

Permalink
docs: add onAnyOutgoing() method in the tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
darrachequesne committed Nov 17, 2023
1 parent d11b0db commit a2174e3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions docs/tutorial/07-api-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,15 @@ socket.onAny((eventName, ...args) => {
});
```

Similarly, for outgoing packets:

```js
socket.onAnyOutgoing((eventName, ...args) => {
console.log(eventName); // 'hello'
console.log(args); // [ 1, '2', { 3: '4', 5: ArrayBuffer (1) [ 6 ] } ]
});
```

## Server API

### Broadcasting
Expand Down

1 comment on commit a2174e3

@vercel
Copy link

@vercel vercel bot commented on a2174e3 Nov 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.