Answer the question
In order to leave comments, you need to log in
How can you handle the opening of a WebSocket(socket.io), even before the opening?
As I understand it, it opens like this:
https://yadi.sk/i/0rvevjKf3GEhL2
1) First, an ajax request is sent.
2) After that, WS opens.
I want to make protection by ip so that it would be impossible to create 2 websockets from one ip.
Done like this:
io.use( and handler function)
but at this point ws is already open.
Is there a means in socket io to set the number of ws from one ip or to process the first ajax request?
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