ZMQ::Message(3p)

NAME
ZMQ::Message - ZMQ Message Object

SYNOPSIS
    use ZMQ;

    my $msg  = ZMQ::Message->new( "Hello World!" );
    my $data = $msg->data();
    my $size = $msg->size();
    my $rv   = $msg->copy( $src );
    my $rv   = $msg->move( $src );
    my $rv   = $msg->close();

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

  ZMQ::Message->new([ $msg ])
Creates a new message. If $msg is passed, calls zmq_msg_init_data(). Othewise zmq_msg_init() is called

  $msg->data()
Retrieves the data in message

  $msg->size()
Retrieves the size of the data in message

  $msg->copy( $src )
Copies contents of $src to $msg

  $msg->move( $src )
Moves contents of $src to $msg

  $msg->close()
Terminates and fress $msg's underlying data structure.