websocket server based on libevent