Skip to content
Discussion options

You must be logged in to vote

Hi, this is what I do:

  /* ... */
}).ws('/io', {
  open: (ws, req) => {
      ws.uuid = create_UUID();
  /* ... */
// UUID generator from: https://gist.github.com/LeverOne/1308368
function create_UUID(a, b) { for (b = a = ''; a++ < 36; b += a * 51 & 52 ? (a ^ 15 ? 8 ^ Math.random() * (a ^ 20 ? 16 : 4) : 4).toString(16) : '-'); return b }

Hope this helps.

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

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

This discussion was converted from issue #86 on December 09, 2020 12:43.