You can check socket is connect by net.socket._handle like this code:
var obj =
new net.socket;
if (!obj._handle){
obj.connect(8080, '127.0.0.1',
function() {
send
;
});
}
else{
send
;
}
posted on 2014-05-13 16:11
胡满超 阅读(523)
评论(0) 编辑 收藏 引用 所属分类:
NodeJS