NAME
IPC::Manager::Client::MessageFiles - Use files on disk as a message store.
DESCRIPTION
The message store is a directory. Each client has a subdirectory. Each message is a file added to the client subdirectories.
SYNOPSIS
use IPC::Manager qw/ipcm_spawn ipcm_connect/;
my $spawn = ipcm_spawn(protocol => 'MessageFiles');
my $con1 = $spawn->connect('con1');
my $con2 = ipcm_connect(con2, $spawn->info);
$con1->send_message(con1 => {'hello' => 'con2'});
my @messages = $con2->get_messages;
METHODS
See IPC::Manager::Client and IPC::Manager::Base::FS for inherited methods.
- $inotify = $con->inotify
-
Returns the Linux::Inotify2 instance watching the client's message directory for newly created message files. Created on first call. Dies unless Linux::Inotify2 is available.
- $arrayref_or_undef = $con->message_files($ext)
-
Scans the client's message directory and returns an arrayref of filenames matching
.ready(when$extis'ready') or.pend(when$extis'pend'), or undef if there are none. As a side-effect, updates the internalpend_countandready_countcaches. - $dirhandle = $con->dir_handle
-
Returns a cached, rewound directory handle for the client's message directory. Opens the directory on first call.
SOURCE
The source code repository for IPC::Manager can be found at https://github.com/exodist/IPC-Manager.
MAINTAINERS
AUTHORS
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.