added some Websocket funcitons.