Skip to content

mutate ws object? #49

Answered by ghost
bradennapier asked this question in Q&A
Discussion options

You must be logged in to vote

Hello,

Many good questions here.

Yes, you can and should mutate the ws object (and res object) in any way you want. Attach anything to it you want. It will be valid from open event to close event. Res object is valid from request event to res.end or res.onAborted or res.tryEnd did succeed.

Getting the IP is WIP and will be added.

Sending ping is also WIP.

Errors, we don't have errors. You don't need to care more than to handle open/close events.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant
Converted from issue

This discussion was converted from issue #49 on December 09, 2020 11:51.