basic websocket server functionality implemented