Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
my $NAME = '/tmp/catsock';
my $uaddr = sockaddr_un($NAME);
my $proto = getprotobyname('tcp');
socket(Server,PF_UNIX,SOCK_STREAM,0) || die "socket: $!";
unlink($NAME);
bind (Server, $uaddr) || die "bind: $!";
listen(Server,SOMAXCONN) || die "listen: $!";
unlink("/tmp/catsock");It never succeeds?
$server = IO::Socket::UNIX->new(LocalAddr => "/tmp/catsock",
Type => SOCK_STREAM,or die "Can't make the server socket: $@\n";
Listen => 5)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl UNIX sockets dilemma
by tadman (Prior) on Feb 03, 2001 at 00:48 UTC | |
|
Re: Perl UNIX sockets dilemma
by Anonymous Monk on Feb 02, 2001 at 19:56 UTC |