I have a code

let url = "ws://127.0.0.1:8080/sock/chat"; const con = new WebSocket(url); 

Which creates a connection through a web socket. How can I change the connection address, for example to "ws://127.0.0.1:8080/sock/chat2" without changing the user's connection session? What would the data go to a different address, or you could choose addresses. Thank.

    1 answer 1

    no way .... new address - new session

    • It is not the answer to the question. To leave your comments or ask the author to clarify, leave a comment to the appropriate post. - from the queue of checks - mymedia
    • For me, the question is clear, does not require additions and corrections, and the proposed answer is the most complete. - Vadim