var handlers = {
'connects':[],
'onClose':function(index,flag) {
this.connects[index.replace("socket_","")].onClose();
},
'onConnect':function(index) {
this.connects[index.replace("socket_","")].onConnect();
},
'onData':function(index,text) {
this.connects[index.replace("socket_","")].onData(text);
},
'debug':function(index,str) {
console.log(str);
}
};
function 소켓4ie() {
this.debug = 0;
this.init = function() {
this.index = handlers.connects.length;
handlers.connects.push(this);
}
this.connect = function(도메인,포트) {
this.createFlash(도메인,포트);
}
this.createFlash = function(domain,port) {
var html = '
' ;
var div = document.createElement('div');
div.id = "flash_" this.index;
div.innerHTML = html;
document.body.appendChild(div);
}
this.onClose = function() {
}
this.onConnect = function() {
}
this.onData = function(text) {
}
this.init();
}