NAME
Mercury::PushPull - Push/pull message pattern
VERSION
version 0.008
SYNOPSIS
DESCRIPTION
ATTRIBUTES
topic
This object's topic, for accounting purposes.
pullers
Connected websockets ready to receive messages.
pushers
Connected websockets who will be pushing messages.
current_puller_index
The puller we will use to send the next message from a pusher.
METHODS
add_puller
$pat->add_puller( $c );
Add a puller to this broker. Pullers are given messages in a round-robin, one at a time, by pushers.
add_pusher
$pat->add_pusher( $c );
Add a pusher to this broker. Pushers send messages to be processed by pullers.
send_message
$pat->send_message( $msg );
Send the given message to the next puller in line.
remove_puller
$pat->remove_puller( $c );
Remove a puller from the list. Called automatically when the puller socket is closed.
remove_pusher
$pat->remove_pusher( $c );
Remove a pusher from the list. Called automatically when the pusher socket is closed.
AUTHOR
Doug Bell <preaction@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2015 by Doug Bell.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.