Fixed bug of Websocket,increasing methos in order to corresponds to the HTML5 version