- or download this
my $protocol = getprotobyname('tcp');
socket(SOCK, AF_INET, SOCK_STREAM, $protocol) or die "No socket: $!";
...
}
close SOCK;
- or download this
my $socket = IO::Socket::INET->new( Listen => 20,
LocalPort => $port,
...
warn "Connection from [$peer,$port] finished\n";
close $session;
}
- or download this
my $socket = IO::Socket::INET->new("$host:$port") or die "No connect:
+$!";
...
$bytes{'out'} += length($msg_out);
$bytes{'in'} += length($msg_in);
}