_proto.connect = function()
{
socket = new Socket();
//socket.connect("echo.websocket.org", 80);
socket.connectByUrl("ws://127.0.0.1:8383");
output = socket.output;
socket.on(Event.OPEN, this, this.onSocketOpen);
socket.on(Event.CLOSE, this, this.onSocketClose);
socket.on(Event.MESSAGE, this, this.onMessageReveived);
socket.on(Event.ERROR, this, this.onConnectError);
bindEvent("onKaijiang",function(e){
});
}
ReferenceError: Socket is not defined
申明原型后就不能用内置的
Socket方法,需要怎么调用呢?