NAME
Distributed::Process::Server - a class to run the server of a Distributed::Process cluster.
SYNOPSIS
use Distributed::Process;
use Distributed::Process::Master;
use Distributed::Process::Server;
use MyTest;
$m = new Distributed::Process::Master ... ;
$s = new Distributed::Process::Server -master => $m, -port => 8147;
$s->listen();
DESCRIPTION
This class handles the server part of the cluster.
It maintains an internal list of Interface objects, one of which is the Master. The Master object must be instanciated and declared with the Server before the listen() method is invoked.
The listen() method will welcome incoming connections and declare them with the Master as new Workers. Commands received on theses sockets will be handled by the handle_line() method of the corresponding Interface, be it a Worker or the Master.
Methods
- listen
-
Starts listening on port(), waiting for incoming connections. If a new connection is made, it is supposed to be from a Worker, and the handle is thus passed on to the Master, by means of its add_worker() method.
If a line is read from an already open handle, it is passed to the handle_line() method of its corresponding interface.
- master MASTER
- master
-
Sets or returns the current Distributed::Process::Master object for this server, and adds it to the list of interfaces.
- quit
-
Sends a
/quit
command to all interfaces and exits the program.
Attributes
- port
-
The port on which the server listens to incoming connections.
SEE ALSO
Distributed::Process::Interface, Distributed::Process::Master,
AUTHOR
Cédric Bouvier, <cbouvi@cpan.org>
BUGS
Please report any bugs or feature requests to bug-distributed-process@rt.cpan.org
, or through the web interface at http://rt.cpan.org. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
COPYRIGHT & LICENSE
Copyright 2005 Cédric Bouvier, All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 210:
Non-ASCII character seen before =encoding in 'Cédric'. Assuming CP1252