websocket cannot connect
nearest
nearest 2017-10-14 12:41:35
0
2
1834

new WebSocket('ws://' 127.0.0.1:843/');can connect

Question 1: Can't connect to a local IP address.

Question 2: Even if the port is changed, the connection will still fail.

Please explain in detail.

nearest
nearest

我爱PHP

reply all(2)
猪哥

How is the local host configured? Another possibility is to check the firewall configuration

  • reply Great, Brother Pig, help me. I have disabled the firewall. The hosts file is as follows 127.0.0.1 localhost 127.0.0.1 localhost 127.0.0.1 localhost 127.0.0.1 localhost 127.0.0.1 localhost 127.0.0.1 localhost 172.20.2.60 localhost Everything else is commented with #
    nearest author 2017-10-16 14:35:36
  • reply The server can connect normally, but the client cannot connect if it is replaced with a real IP. The client can connect using localhost. When accessed by other computers in the LAN, the connection still fails.
    nearest author 2017-10-16 16:05:44
极世

Let’s try restarting the computer, then there’s the configuration problem

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template