Troels Liebe Bentsen > RPC-Async-1.05 > RPC::Async::URL

Download:
RPC-Async-1.05.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Module Version: 1.05   Source  

NAME ^

RPC::Async::URL - Utility functions to handle URLs

SYNOPSIS ^

    use RPC::Async::URL;

    my $socket1 = url_connect("tcp://1.2.3.4:5678");
    my $socket2 = url_connect("open://dir/file.pl", "--my-option");
    my ($stdout, $stderr) = url_connect("open2://dir/file.pl", "--my-option");
    my ($socket3) = url_connect("unix://mysocket.sock");
    my ($socket4) = url_connect("perl://perlsrvd.pl");

METHODS ^

url_connect($url)

Turns an URL into a socket. Currently supported schemes are: * (tcp|udp)://HOST:PORT, Returns a udp of tcp socket. * (unix|unix_dgram)://path/file.sock, Returns a unix domain socket connection. * (perl|perlroot|perl2|perlroot2)(header)?://path/file.pl, Starts a new perl and loads a default header unless it ends in header, then first argument is used as header. It also connects a socket between the two and returns that. Urls with 2 in the end also returns $pid, stdout and stderr. Urls with root in them does not drop root privilages after starting the process the others will. * open2://file, run file and return stdout, stderr and the $pid.

url_absolute($cwd, @urls)

Make urls paths absolute, by adding $cwd to all urls.

url_disconnect($cwd, @urls)

Wait for url to disconnect

url_explode($cwd, @urls)

Explode URL components into smaller bits, only supports tcp and udp.

url_listen($cwd, @urls)

Same as connect, just returns a listening socket instead. Only tcp://, udp:// and unix:// supported.

AUTHOR ^

Jonas Jensen <jonas@infopro.dk>, Troels Liebe Bentsen <troels@infopro.dk>

COPYRIGHT ^

Copyright(C) 2005-2007 Troels Liebe Bentsen

Copyright(C) 2005-2007 Jonas Jensen

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

syntax highlighting: