Answer the question
In order to leave comments, you need to log in
How to write a token to a socket as a global variable?
I need to pass a token on every request to the server via socket.io. Why not write it every time in the data that I pass to the server?
I have seen this method:
var socket = io.connect('http://localhost:9000', {
'query': 'token=' + your_token
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question