Skip to content
Discussion options

You must be logged in to vote

You've got an extra set of }) at the end that needs to be removed, and open event does not have req so you need to remove that, and if you want to share something across open and message events you should put it in the ws object

open:ws=>{
   ws.foo=true
},
message:(ws,message,isBinary)=>{
   console.log(ws.foo)
}

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
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
2 participants
Converted from issue

This discussion was converted from issue #380 on December 09, 2020 03:44.