Cédric Bouvier > Distributed-Process > Distributed::Process::Interface

Download:
Distributed-Process-0.20.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  1
View Bugs
Report a bug
Source  

NAME ^

Distributed::Process::Interface - a base class for handling a network connection and the commands received from it.

DESCRIPTION ^

Methods

wait_for_pattern REGEX

Reads lines on the connection in_handle() until the line matches REGEX. Returns the list of all the read lines, including the one that matched.

available_for_reading

This method is invoked by wait_for_pattern() before reading a line on in_handle(), to decide whether to stop waiting for a given pattern. If available_for_reading() returns true, wait_for_pattern() will go on waiting for lines to flow in; if it yields false, wait_for_pattern() will return undef.

By default, available_for_reading() always returns 1, which means that wait_for_pattern() indefinitely reads lines from in_handle() until one of them matches the given pattern. Subclasses can overload available_for_reading() to return 0 should something different occur.

send LIST

Prints each string in LIST with a CR+LF sequence to the output stream.

Attributes

The following list describes the attributes of this class. They must only be accessed through their accessors. When called with an argument, the accessor methods set their attribute's value to that argument and return its former value. When called without arguments, they return the current value.

server

The P::D::Server under which the Interface is running.

id

A unique identifier for the interface.

handle
in_handle

The IO::Handle object that represents the input stream.

out_handle

The IO::Handle object that represents the output stream.

SEE ALSO ^

Distributed::Process::Server, Distributed::Process::Client, Distributed::Process::Master, Distributed::Process::RemoteWorker

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.