rewrite websocket server in go