NAME

IPC::Manager::Base::FS::Handle - Base class for filesystem clients that read via a handle

DESCRIPTION

This is an intermediate base class for filesystem-based protocol clients that receive messages through a filehandle (such as a FIFO pipe or a Unix socket). It extends IPC::Manager::Base::FS and provides pending_messages and ready_messages implementations built on top of a buffering primitive.

Subclasses must implement fill_buffer.

METHODS

See IPC::Manager::Base::FS and IPC::Manager::Client for inherited methods.

$bool = $con->fill_buffer

Read available data from the underlying handle into the internal message buffer. Returns true if at least one message was placed in the buffer.

This method must be implemented by subclasses; the base implementation dies with "Not Implemented".

$bool = $con->pending_messages

Returns true if there are messages that appear to be incoming but may not yet be fully readable. Checks (in order): a resume file, the in-memory buffer, and — if IO::Select is available — whether the handle is ready for reading, otherwise calls fill_buffer.

$bool = $con->ready_messages

Returns true if there is at least one complete message that can be returned immediately by get_messages. Checks the resume file and buffer first; if neither has data it calls pending_messages then fill_buffer to determine whether a message can be made available.

SOURCE

The source code repository for IPC::Manager can be found at https://github.com/exodist/IPC-Manager.

MAINTAINERS

Chad Granum <exodist@cpan.org>

AUTHORS

Chad Granum <exodist@cpan.org>

COPYRIGHT

Copyright Chad Granum <exodist7@gmail.com>.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

See https://dev.perl.org/licenses/