socket.io client connect disconnect

后端 未结 2 1549
生来不讨喜
生来不讨喜 2021-02-01 06:03

I am unable to figure out why disconnecting / connecting a socket.io connection multiple times is not working ?

Server side code:

io.on(\'connection\', f         


        
2条回答
  •  悲&欢浪女
    2021-02-01 06:25

    Have you tried this config in client ?

    // 0.9  socket.io version
    io.connect(SERVER_IP, {'force new connection': true});
    
    // 1.0 socket.io version
    io.connect(SERVER_IP, {'forceNew': true});
    

提交回复
热议问题