Websocket支持管理虚拟机 [英] Websocket support in managed vm
问题描述
我尝试在我的Golang应用程序中使用 websockets ,这些应用程序来自Google的管理虚拟机但我无法从Chrome开发者控制台中使用它我得到:
$ b
与'ws://127.0.0.1:8080 / connect'的WebSocket连接失败:在WebSocket握手期间错误
:意外响应代码:400和我的
后端我得到:websocket:connection header!= upgrade。
我的问题,托管虚拟机是否支持Golang websockets?如果是这样,一个代码片断将不胜感激。
根据谷歌的文档和示例,受管理的虚拟机像现在一样支持Java语言的WebSocket。可能在未来的版本中(因为托管虚拟机仍处于Beta版),为了解决这些功能和/或功能,将考虑GO语言。
I've tried using websockets within my Golang application served from Google's managed vm but I couldn't get it to work, from Chrome developer console I'm getting:
WebSocket connection to 'ws://127.0.0.1:8080/connect' failed: Error during WebSocket handshake: Unexpected response code: 400" and on my backend I'm getting: "websocket: connection header != upgrade.
My question, does managed vm supports Golang websockets? If so a code snip would be appreciated.
As per Google's documentation and the example included over there, Managed VMs supports WebSocket in "Java" language as for now. May be in the future release (as Managed VMs is still in its Beta version), "GO" language will be put into consideration for addressing such functionality and/or feature.
这篇关于Websocket支持管理虚拟机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!