Clio::Server::ClientsManager - Clients manager
version 0.02
Clients manager is created by Clio::Server to manage incoming connections.
Class used to create new client object is set by configuration key, eg:
<Server> Class TCP <Client> Class Handle ... </Client> </Server>
would use Clio::Server::TCP::Client::Handle.
Consumes the Clio::Role::HasContext.
while ( my ($id, $client) = each %{ $clients_manager->clients } ) { print $client->write("Welcome client $id"); }
All managed clients.
my $client = $client_manager->new_client( id => $uuid, %class_specific_args );
Creates new managed client. Arguments are specific to the class.
$client_manager->disconnect_client( $client->id );
Disconnects client.
my $connected_clients = $clients_manager->total_count;
Total number of connected clients.
Alex J. G. Burzyński <ajgb@cpan.org>
This software is copyright (c) 2012 by Alex J. G. Burzyński <ajgb@cpan.org>.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Clio, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Clio
CPAN shell
perl -MCPAN -e shell install Clio
For more information on module installation, please visit the detailed CPAN module installation guide.