Home > Article > Backend Development > What to do if golang websocket fails
What should I do if golang websocket fails?
Problem:
Use the github.com/gorilla/websocket package and run the go websocket service program under windows. After entering the address, the browser displays the following problem:
WebSocket connection to 'ws://localhost:8080/ws' failed: Connection closed before receiving a handshake response and Provisional headers are shown Problem
Solution:
Finally deploy the program to Linux After booting, the problem is solved. It is suspected that it may be unfriendly to Windows support.
Recommended related articles and tutorials: golang tutorial
The above is the detailed content of What to do if golang websocket fails. For more information, please follow other related articles on the PHP Chinese website!