Ask a Question related to PERL Modules, Design and Development.
-
Russ Jones #1
UNIX Domain sockets on HPUX
I'm trying to use UNIX Domain sockets on HPUX 11.11, using Perl 5.6.1 for
PA-RISC2.0, the IO::Socket module, without much luck.
I've tried the code in Perl Cookbook, and many modifications. Here's my
code:
#!/usr/bin/perl
use IO::Socket;
use strict;
use warnings;
unlink "/tmp/mysock";
our $server = IO::Socket::UNIX->new(LocalAddr => "/tmp/mysock",
Type => SOCK_DGRAM,
Listen => 5)
or die $!;
while (my $client = $server->accept())
{
while (defined (my $buf = <$client>))
{
print "$buf\n";
}
}
close ($server);
exit(0);
When I run it, the ->new() call appears to work. No error codes and the
debugger reports that $server is a socket. The /tmp/mysock file doesn't
get created, though.
Then the while($client = ... ) just falls through. It doesn't wait for
the socket to say anything, it just skips to the close() statement and
exits.
I've done this with INET sockets a number of times with no problems, but
this is the first time I've tried UNIX sockets.
I wonder if it might be a HPUX issue. If anyone has any ideas, I'd
appreciate hearing about them.
Thanks
Russ Jones
Russ Jones Guest
-
Need help with a simple UNIX sockets server based on IO::Socket::UNIX
Hi. I've tried to create a simple client + server that communicate through a unix socket. As with all socket servers, it has a loop where it... -
sockets on an HPUX (thanks for the port scanner!)
Thank you Mr. Saffioti for the port-scanning code. I have been playing with some simple network programming scripts recently and your code below is... -
sockets on an HPUX
People of the Perl, does anyone have a perl program that will create a socket ( srwxr-xr-x ) for a HPUX 11.0 system? I am in need of this! I... -
Perl sockets on an HPUX
Great where do I get this IO::Socket module? thank you Derek B. Smith OhioHealth IT UNIX / TSM / EDM Teams -
unix domain sockets buffer limitations 4kb
in aix, the maximum size of the unix domain sockets buffer is limitd to 4kb. and this size is within the limits of the operating system. in case of... -
Russ Jones #2
UNIX Domain sockets on HPUX
I'm trying to use UNIX Domain sockets on HPUX 11.11, using Perl 5.6.1 for
PA-RISC2.0, the IO::Socket module, without much luck.
I've tried the code in Perl Cookbook, and many modifications. Here's my
code:
#!/usr/bin/perl
use IO::Socket;
use strict;
use warnings;
unlink "/tmp/mysock";
our $server = IO::Socket::UNIX->new(LocalAddr => "/tmp/mysock",
Type => SOCK_DGRAM,
Listen => 5)
or die $!;
while (my $client = $server->accept())
{
while (defined (my $buf = <$client>))
{
print "$buf\n";
}
}
close ($server);
exit(0);
When I run it, the ->new() call appears to work. No error codes and the
debugger reports that $server is a socket. The /tmp/mysock file doesn't
get created, though.
Then the while($client = ... ) just falls through. It doesn't wait for
the socket to say anything, it just skips to the close() statement and
exits.
I've done this with INET sockets a number of times with no problems, but
this is the first time I've tried UNIX sockets.
I wonder if it might be a HPUX issue. If anyone has any ideas, I'd
appreciate hearing about them.
Thanks
Russ Jones
Russ Jones Guest




