Can use comm-socket with argument
This commit is contained in:
parent
147bb5be55
commit
5b2b4265a4
@ -7,12 +7,22 @@ use threads;
|
||||
|
||||
die("Give at least the socket file as argument") if (! @ARGV);
|
||||
|
||||
my $sock_path = shift @ARGV;
|
||||
|
||||
my $socket = IO::Socket::UNIX->new(
|
||||
Type => SOCK_STREAM,
|
||||
Peer => $ARGV[0],
|
||||
Peer => $sock_path,
|
||||
);
|
||||
|
||||
die "Can't create socket: $!" unless $socket;
|
||||
die "Can't read socket ($sock_path): $!" unless $socket;
|
||||
|
||||
if (@ARGV)
|
||||
{
|
||||
while (my $arg = shift @ARGV)
|
||||
{
|
||||
say $socket $arg;
|
||||
}
|
||||
}
|
||||
|
||||
my $s = IO::Select->new();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user