NAME

ZMQ::Message - A 0MQ Message object

SYNOPSIS

  use ZMQ qw/:all/;
  
  my $cxt = ZMQ::Context->new;
  my $sock = ZMQ::Socket->new($cxt, ZMQ_REP);
  my $msg = ZMQ::Message->new($text);
  $sock->send($msg);
  my $anothermsg = $sock->recv;

DESCRIPTION

A ZMQ::Message object represents a message to be passed over a ZMQ::Socket.

METHODS

new

Creates a new ZMQ::Message.

Takes the data to send with the message as argument.

new_from_message( $rawmsg )

Creates a new ZMQ::Message.

Takes a ZMQ::Raw::Message object as argument.

message

Return the underlying ZMQ::Raw::Message object.

size

Returns the length (in bytes) of the contained data.

data

Returns the data as a (potentially binary) string.

SEE ALSO

ZMQ, ZMQ::Socket, ZMQ::Context

http://zeromq.org

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

AUTHOR

Daisuke Maki <daisuke@endeworks.jp>

Steffen Mueller, <smueller@cpan.org>

COPYRIGHT AND LICENSE

The ZMQ module is

Copyright (C) 2010 by Daisuke Maki

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.