Steffen Müller > ZeroMQ-0.01 > ZeroMQ

Download:
ZeroMQ-0.01.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  10
View/Report Bugs
Module Version: 0.01   Source   Latest Release: ZeroMQ-0.23

NAME ^

ZeroMQ - A ZeroMQ2 wrapper for Perl

SYNOPSIS ^

  use ZeroMQ qw/:all/;
  
  my $cxt = ZeroMQ::Context->new;
  my $sock = ZeroMQ::Socket->new($cxt, ZMQ_REP);
  $sock->bind($addr);
  
  my $msg;
  foreach (1..$roundtrip_count) {
    $msg = $sock->recv();
    die "Bad size" if $msg->size() != $msg_size;
    $sock->send($msg);
  }

See the xt/ directory for full examples.

DESCRIPTION ^

The ZeroMQ module is a wrapper of the 0MQ message passing library for Perl. It's a thin wrapper around the C++ API.

Loading ZeroMQ will make the ZeroMQ::Context, ZeroMQ::Socket, and ZeroMQ::Message classes available as well.

EXPORTS

You may choose to import one or more (using the :all import tag) constants into your namespace by supplying arguments to the use ZeroMQ call as shown in the synopsis above.

The exportable constants are:

CAVEATS ^

This is an early release. Proceed with caution, please report (or better yet: fix) bugs you encounter. Tested againt 0MQ 2.0.7.

Use of the inproc:// transport layer doesn't seem to work between two perl ithreads. This may be due to the fact that right now, context aren't shared between ithreads and inproc works only within a single context. Try another transport layer until contexts can be shared.

SEE ALSO ^

ZeroMQ::Context, ZeroMQ::Socket, ZeroMQ::Message

http://zeromq.org

ExtUtils::XSpp, Module::Build::WithXSpp

AUTHOR ^

Steffen Mueller, <smueller@cpan.org>

COPYRIGHT AND LICENSE ^

The ZeroMQ module is

Copyright (C) 2010 by Steffen Mueller

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.0 or, at your option, any later version of Perl 5 you may have available.

syntax highlighting: