M
M
matveyvarg2015-10-14 19:57:46
JavaScript
matveyvarg, 2015-10-14 19:57:46

How to save socket id when redirecting?

The page has two buttons: Create and Join. By clicking on which you, respectively, either create a room or connect to an already created one. After creation/connection, it redirects to "/room", but then the socket id changes. Also it turns out that socket.join(room);goes already for other socket. How can I store the id of the first socket or use it socket.join(room);for the socket after the redirect?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Aksentiev, 2015-10-14
@Sanasol

No way.
There is a session mechanism for this.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question