[libmessage-passing-zeromq-perl] 33/78: More docs

Jonas Smedegaard js at alioth.debian.org
Mon Sep 30 09:28:22 UTC 2013


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository libmessage-passing-zeromq-perl.

commit 3813d634dfb89f164b939c867af2478c77dcb388
Author: Tomas Doran <bobtfish at bobtfish.net>
Date:   Wed May 16 11:06:03 2012 +0100

    More docs
---
 lib/Log/Stash/Input/ZeroMQ.pm            |    2 +-
 lib/Log/Stash/ZeroMQ/Role/HasAContext.pm |   20 ++++++++++
 lib/Log/Stash/ZeroMQ/Role/HasASocket.pm  |   60 +++++++++++++++++++++++++++---
 3 files changed, 75 insertions(+), 7 deletions(-)

diff --git a/lib/Log/Stash/Input/ZeroMQ.pm b/lib/Log/Stash/Input/ZeroMQ.pm
index 7d8c0f5..8469df5 100644
--- a/lib/Log/Stash/Input/ZeroMQ.pm
+++ b/lib/Log/Stash/Input/ZeroMQ.pm
@@ -104,7 +104,7 @@ the SureVoIP API -
 
 =head1 AUTHOR, COPYRIGHT AND LICENSE
 
-See L<Log::Stash>.
+See L<Log::Stash::ZeroMQ>.
 
 =cut
 
diff --git a/lib/Log/Stash/ZeroMQ/Role/HasAContext.pm b/lib/Log/Stash/ZeroMQ/Role/HasAContext.pm
index 5345aa4..2f9f38e 100644
--- a/lib/Log/Stash/ZeroMQ/Role/HasAContext.pm
+++ b/lib/Log/Stash/ZeroMQ/Role/HasAContext.pm
@@ -5,6 +5,8 @@ use ZeroMQ ':all';
 use Scalar::Util qw/ weaken /;
 use namespace::autoclean;
 
+## TODO - Support (default to?) shared contexts
+
 has _ctx => (
     is => 'ro',
     isa => 'ZeroMQ::Context',
@@ -21,3 +23,21 @@ has _ctx => (
 
 1;
 
+=head1 NAME
+
+Log::Stash::ZeroMQ::Role::HasAContext - Components with a ZeroMQ context consume this role.
+
+=head1 SPONSORSHIP
+
+This module exists due to the wonderful people at Suretec Systems Ltd.
+<http://www.suretecsystems.com/> who sponsored it's development for its
+VoIP division called SureVoIP <http://www.surevoip.co.uk/> for use with
+the SureVoIP API - 
+<http://www.surevoip.co.uk/support/wiki/api_documentation>
+
+=head1 AUTHOR, COPYRIGHT AND LICENSE
+
+See L<Log::Stash::ZeroMQ>.
+
+=cut
+
diff --git a/lib/Log/Stash/ZeroMQ/Role/HasASocket.pm b/lib/Log/Stash/ZeroMQ/Role/HasASocket.pm
index c5e4401..dcb7688 100644
--- a/lib/Log/Stash/ZeroMQ/Role/HasASocket.pm
+++ b/lib/Log/Stash/ZeroMQ/Role/HasASocket.pm
@@ -81,13 +81,42 @@ Log::Stash::ZeroMQ::HasASocket - Role for instances which have a ZeroMQ socket.
 
 Bind a server to an address.
 
+For example C<< tcp://*:5222 >> to make a server listening
+on a port on all of the host's addresses, or C<< tcp://127.0.0.1:5222 >>
+to bind the socket to a specific IP on the host.
+
 =head2 connect
 
-Connect to a server.
+Connect to a server. For example C<< tcp://127.0.0.1:5222 >>.
+
+This option is mutually exclusive with socket_bind, as sockets
+can connect in one direction only.
 
 =head2 socket_type
 
-PUB/SUB/PUSH/POLL
+The connection direction can be either the same as, or the opposite
+of the message flow direction.
+
+The currently supported socket types are:
+
+=head3 PUB
+
+This socket publishes messages to zero or more subscribers.
+
+All subscribers get a copy of each message.
+
+=head3 SUB
+
+The pair of PUB, recieves broadcast messages.
+
+=head3 PUSH
+
+This socket type distributes messages in a round-robin fashion between
+subscribers. Therefore N subscribers will see 1/N of the message flow.
+
+=head2 PULL
+
+The pair of PUSH, recieves a proportion of messages distributed.
 
 =head2 linger
 
@@ -95,6 +124,23 @@ Bool indicating the value of the ZMQ_LINGER options.
 
 Defaults to 0 meaning sockets are lossy, but will not block.
 
+=head3 linger off (default)
+
+Sending messages will be buffered on the client side up to the set
+buffer for this connection. Further messages will be dropped until
+the buffer starts to empty.
+
+Receiving messages will be buffered by ZeroMQ for you until you're
+ready to recieve them, after which they will be discarded.
+
+=head3 linger off
+
+Sending messages will be be buffered on the client side up to the set
+buffer for this connection. If this buffer fills, then ZeroMQ will block
+the program which was trying to send the message. If the client quits
+before all messages were sent, ZeroMQ will block exit until they have been
+sent.
+
 =head1 METHODS
 
 =head2 setsockopt
@@ -104,13 +150,15 @@ is created.
 
 =head1 SPONSORSHIP
 
-This module exists due to the wonderful people at
-L<Suretec Systems|http://www.suretecsystems.com/> who sponsored it's
-development.
+This module exists due to the wonderful people at Suretec Systems Ltd.
+<http://www.suretecsystems.com/> who sponsored it's development for its
+VoIP division called SureVoIP <http://www.surevoip.co.uk/> for use with
+the SureVoIP API - 
+<http://www.surevoip.co.uk/support/wiki/api_documentation>
 
 =head1 AUTHOR, COPYRIGHT AND LICENSE
 
-See L<Log::Stash>.
+See L<Log::Stash::ZeroMQ>.
 
 =cut
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libmessage-passing-zeromq-perl.git



More information about the Pkg-perl-cvs-commits mailing list