InetAddress bind_ip = address==null?null:address.getAddress();
NetworkAdminProtocolTester tester;
if ( type == PT_HTTP ){
tester = new NetworkAdminHTTPTester( core );
}else if ( type == PT_TCP ){
tester = new NetworkAdminTCPTester( core );
}else{
tester = new NetworkAdminUDPTester( core );
}
InetAddress res;
if ( port <= 0 ){
res = tester.testOutbound( bind_ip, 0 );
}else{
res = tester.testInbound( bind_ip, port );
}
return( res );