Home >Backend Development >Golang >What to do if golang websocket fails

What to do if golang websocket fails

藏色散人
藏色散人Original
2019-12-24 17:16:453197browse

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn