initial websocket server code