The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Mercury::Pattern::Bus - A messaging pattern where all peers share messages

VERSION

version 0.010

SYNOPSIS

DESCRIPTION

ATTRIBUTES

peers

The list of peers connected to this bus.

METHODS

add_peer

    $pat->add_peer( $tx )

Add the given connection as a peer to this bus.

remove_peer

Remove the connection from this bus. Called automatically by the finish handler.

send_message

    $pat->send_message( $message, $from )

Send a message to all the peers on this bus. If a $from websocket is specified, will not send to that peer (they should know what they sent).

SEE ALSO

AUTHOR

Doug Bell <preaction@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2016 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.