Help for this page

Select Code to Download


  1. or download this
    $proto = getprotobyname("tcp");
    $iaddr = inet_aton($host) or
    ...
    }
    
    close SOCKET or die "close: $!";
    
  2. or download this
    $protocol = getprotobyname("tcp");
    socket(SOCK,PF_INET,SOCK_STREAM,$protocol) or
    ...
    
    print "Closing connection.\n";
    close CLIENT;