Scroll to navigation

Net::Async::Tangence::Server(3pm) User Contributed Perl Documentation Net::Async::Tangence::Server(3pm)

NAME

"Net::Async::Tangence::Server" - serve "Tangence" clients using "IO::Async"

DESCRIPTION

This subclass of IO::Async::Listener accepts Tangence client connections.

PARAMETERS

The following named parameters may be passed to "new" or "configure":

The Tangence::Registry for the server's objects.

OVERRIDEABLE METHODS

The following methods are provided but intended to be overridden if the implementing class wishes to provide different behaviour from the default.

conn_rootobj

   $rootobj = $server->conn_rootobj( $conn, $identity )

Invoked when a "GETROOT" message is received from the client, this method should return a Tangence::Object as root object for the connection.

The default implementation will return the object with ID 1; i.e. the first object created in the registry.

conn_permits_registry

   $allow = $server->conn_permits_registry( $conn )

Invoked when a "GETREGISTRY" message is received from the client on the given connection object. This method should return a boolean to indicate whether the client is allowed to access the object registry.

The default implementation always permits this, but an overridden method may decide to disallow it in some situations. When disabled, a client will not be able to gain access to any serverside objects other than the root object, and (recursively) any other objects returned by methods, events or properties on objects already known. This can be used as a security mechanism.

AUTHOR

Paul Evans <leonerd@leonerd.org.uk>

2022-09-10 perl v5.34.0