Go语言开发分布式聊天室

IM鑫爷 ·
index.html 上是这样的: client = new WebSocket("ws://localhost:9239"); console.log(client) client.onopen = function(event) { console.log("connected"); sendMsg({ type: 'login', name: name }); $('.loginbg').hide(); $('.login').hide(); };
#2
更多评论
func main() { listener, _ := net.Listen("tcp", "127.0.0.1:9111") fmt.Println(listener) srv := newChatServer("127.0.0.1:9110", "10.0.0.9:6379"); fmt.Println("2222") fmt.Println(srv) fcgi.Serve(listener, srv) } 这样配置对吗?我这样配置老是报错
#1
报错:WebSocket connection to 'ws://localhost:9239/' failed: Error during WebSocket handshake: net::ERR_CONNECTION_RESET
#3