COCOS2D-JS有方法可以使用socket吗

COCOS2D-JS有方法可以使用socket吗?在网络上只看到websocket和http

可以
XWebSocket.getSocketWithUrl(this.url);