示例#1
0
文件: cherry_test.go 项目: xozrc/xo
func countServer(conn *websocket.Conn) {
	sess := cherry.NewWSSession(wsc.Context(), conn, &CounterHandler{}, nil, nil, nil, nil)
	cherry.WSServe(sess, conn)
}
示例#2
0
文件: cherry_test.go 项目: xozrc/xo
func echoServer(conn *websocket.Conn) {
	sess := cherry.NewWSSession(wsc.Context(), conn, cherry.HandlerFunc(echoHandler), nil, nil, nil, nil)
	cherry.WSServe(sess, conn)
}