index.js
function(link, cb){
            var options = {
                host: urlArr.hostname,
                port: urlArr.port,
                path: urlArr.path+"?link="+encodeURIComponent(link),
                method: 'GET'
            };
            
            var getRequest = protocol.request(options, function(res){
                var result = "";
                
                if(res.statusCode === 200){
                    res.on('error', function(error) {
                        if(typeof cb === "function")
                            cb(error);
                    });

                    res.on('data', function (chunk) {
                        result += chunk;
                    });

                    res.on('end', function (chunk) {
                        if(typeof cb === "function"){
                            var resultObj = JSON.parse(result);
                            var err = (resultObj.status === "error") ? resultObj["msg"] : null
                            cb(err, resultObj);
                        }                        
                    });
                }
                else{
                    if(typeof cb === "function")
                        cb("Request return HTTP "+res.statusCode);
                }
            });
            
            getRequest.end();
        }
function(link, cb){
            var options = {
                host: urlArr.hostname,
                port: urlArr.port,
                path: urlArr.path+"?link="+encodeURIComponent(link),
                method: 'GET'
            };
            
            var getRequest = protocol.request(options, function(res){
                var result = "";
                
                if(res.statusCode === 200){
                    res.on('error', function(error) {
                        if(typeof cb === "function")
                            cb(error);
                    });

                    res.on('data', function (chunk) {
                        result += chunk;
                    });

                    res.on('end', function (chunk) {
                        if(typeof cb === "function"){
                            var resultObj = JSON.parse(result);
                            var err = (resultObj.status === "error") ? resultObj["msg"] : null
                            cb(err, resultObj);
                        }                        
                    });
                }
                else{
                    if(typeof cb === "function")
                        cb("Request return HTTP "+res.statusCode);
                }
            });
            
            getRequest.end();
        }
function ( link , cb ) { var options = { host : urlArr . hostname , port : urlArr . port , path : urlArr . path + "?link=" + encodeURIComponent ( link ) , method : 'GET' } ; var getRequest = protocol . request ( options , function ( res ) { var result = "" ; if ( res . statusCode === 200 ) { res . on ( 'error' , function ( error ) { if ( typeof cb === "function" ) cb ( error ) ; } ) ; res . on ( 'data' , function ( chunk ) { result += chunk ; } ) ; res . on ( 'end' , function ( chunk ) { if ( typeof cb === "function" ) { var resultObj = JSON . parse ( result ) ; var err = ( resultObj . status === "error" ) ? resultObj [ "msg" ] : null cb ( err , resultObj ) ; } } ) ; } else { if ( typeof cb === "function" ) cb ( "Request return HTTP " + res . statusCode ) ; } } ) ; getRequest . end ( ) ; }
Function do get link status

@param string link
@param function cb
@return void
Function do get link status