nodejs socket is connect

nodejs socket is connect
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 ;
}

你可能感兴趣的:(nodejs socket is connect)