Example #1
0
func countServer(conn *websocket.Conn) {
	sess := cherry.NewWSSession(wsc.Context(), conn, &CounterHandler{}, nil, nil, nil, nil)
	cherry.WSServe(sess, conn)
}
Example #2
0
func echoServer(conn *websocket.Conn) {
	sess := cherry.NewWSSession(wsc.Context(), conn, cherry.HandlerFunc(echoHandler), nil, nil, nil, nil)
	cherry.WSServe(sess, conn)
}