lindseyprog has asked for the wisdom of the Perl Monks concerning the following question:
$them = $opt_h; $iaddr = inet_aton($remote); $paddr = sockaddr_in($port, $iaddr); $proto = getprotobyname('tcp'); socket(SOCKET, AF_INET, SOCK_STREAM, $proto) || die "socket error: + $!"; print STDOUT "connecting...\n\n"; if (connect(SOCKET,$paddr)) { print STDOUT "Connected to host: $them, port: $port\n\n"; } else { die "socket error: $!"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: bind a client connection
by wrog (Friar) on Feb 11, 2012 at 21:22 UTC | |
by Anonymous Monk on Feb 11, 2012 at 22:29 UTC | |
by wrog (Friar) on Feb 12, 2012 at 00:25 UTC | |
by Anonymous Monk on Feb 12, 2012 at 00:34 UTC | |
|
Re: bind a client connection
by Anonymous Monk on Feb 10, 2012 at 21:23 UTC |