NAME
Net::Async::Tangence::Client
- connect to a Tangence
server using IO::Async
DESCRIPTION
This subclass of Net::Async::Tangence::Protocol connects to a Tangence server, allowing the client program to access exposed objects in the server. It is a concrete implementation of the Tangence::Client
mixin.
The following documentation concerns this specific implementation of the client; for more general information on the Tangence
-specific parts of this class, see instead the documentation for Tangence::Client.
PARAMETERS
The following named parameters may be passed to new
or configure
:
- identity => STRING
-
The identity string to send to the server.
- on_error => STRING or CODE
-
Default error-handling policy for method calls. If set to either of the strings
carp
orcroak
then a CODE ref will be created that invokes the given function fromCarp
; otherwise must be a CODE ref.
METHODS
$client->connect_url( $url, %args )
Connects to a Tangence
server at the given URL.
Takes the following named arguments:
- on_connected => CODE
-
Invoked once the connection to the server has been established.
$on_connected->( $client )
- on_registry => CODE
- on_root => CODE
-
Invoked once the registry and root object proxies have been obtained from the server. See the documentation the Tangence::Client
tangence_connected
method.
The following URL schemes are recognised:
exec
Directly executes the server as a child process. This is largely provided for testing purposes, as the server will only run for this one client; it will exit when the client disconnects.
exec:///path/to/command?with+arguments
The URL's path should point to the required command, and the query string will be split on
+
signs and used as the arguments. The authority section of the URL will be ignored, so may be left empty.sshexec
A convenient wrapper around the
exec
scheme, to connect to a server running remotely via ssh.sshexec://host/path/to/command?with+arguments
The URL's authority section will give the SSH server (and optionally username), and the path and query sections will be used as for
exec
.(This scheme is also available as
ssh
, though this name is now deprecated)tcp
Connects to a server via a TCP socket.
tcp://host:port/
The URL's authority section will be used to give the server's hostname and port number. The other sections of the URL will be ignored.
unix
Connects to a server via a UNIX local socket.
unix:///path/to/socket
The URL's path section will give the path to the local socket. The other sections of the URL will be ignored.
sshunix
Connects to a server running remotely via a UNIX socket over ssh.
sshunix://host/path/to/socket
(This is implemented by running perl remotely and sending it a tiny self-contained program that connects STDIN/STDOUT to the given UNIX socket path. It requires that the server has perl at least version 5.6 available in the path simply as
perl
)
AUTHOR
Paul Evans <leonerd@leonerd.org.uk>