ZMQPerl-ish Interface libzmq | |
Download |
ZMQ Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Daisuke Maki
- Publisher web site:
- http://search.cpan.org/~dmaki/
ZMQ Tags
ZMQ Description
ZMQ is a Perl wrapper for libzmq. It uses ZMQ::LibZMQ2 or ZMQ::LibZMQ3 (ZMQ::LibZMQ2 is the default)If you want a one-to-one direct mapping to libzmq, then you should be using ZMQ::LibZMQ2, ZMQ::LibZMQ3 directlyZMQ will automatically choose the backend (either ZMQ::LibZMQ2 or ZMQ::LibZMQ3) to use. This can be explicitly specified by setting PERL_ZMQ_BACKEND environment variable.By default ZMQ::LibZMQ2 will be used as the backend. This may change in future versions, so make sure to explicitly set your backend if you don't want it to change: BEGIN { $ENV{ PERL_ZMQ_BACKEND } = 'ZMQ::LibZMQ2'; } use ZMQ;SYNOPSIS use ZMQ; use ZMQ::Constants qw(ZMQ_PUB); my $cxt = ZMQ::Context->new(5); my $sock = $cxt->socket( ZMQ_PUB ); $sock->bind( "tcp://192.168.11.5:9999" ); if ( $ZMQ::BACKEND eq 'ZMQ::LibZMQ2' ) { $sock->send( ZMQ::Message->new( "Hello" ) ); } elsif ( $ZMQ::BACKEND eq 'ZMQ::LibZMQ3' ) { $sock->sendmsg( ZMQ::Message->new( "Hello" ) ); }Product's homepage
ZMQ Related Software