The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

ZMQ::Raw::Socket - ZeroMQ Socket class

VERSION

version 0.04

DESCRIPTION

A ZMQ::Raw::Socket represents a ZeroMQ socket.

METHODS

new( $context, $type )

Create a new ZeroMQ socket with the specified $context. $type specifies the socket type, which determines the semantics of communication over the socket.

bind( $endpoint )

Bind the socket to a local endpoint which accepts incoming connections. The endpoint is a string consisting of a transport:// followed by an address. The transport specifies the underlying protocol to use, whereas the address specifies the transport-specific address to bind to. The following transports are provided:

  • "tcp"

    unicast transport using TCP

  • "ipc"

    local inter-process communication transport

  • "inproc"

    local in-process (inter-thread) communication transport

  • "pgm,epgm"

    reliable multicast transport using PGM

  • "vmci"

    virtual machine communications interface (VMCI)

unbind( $endpoint )

Unbind the socket from the endpoint.

connect( $endpoint )

Connect the socket to an endpoint which accepts incoming connections.

disconnect( $endpoint )

Disconnect the socket from the endpoint. Any outstanding messages physically received from the network but not yet received by the application will be discarded.

send( $buffer, $flags = 0)

Queue a message created from $buffer. $flags defaults to 0 but may be a combination of:

  • ZMQ::Raw->ZMQ_DONTWAIT

    unicast transport using TCP

  • ZMQ::Raw->ZMQ_SNDMORE

    local inter-process communication transport

sendmsg( $msg, $flags = 0)

Queue $msg to be sent.

recv( $size = 1024*1024, $flags = 0)

Receive a message. If $size does not have enough space to store a full message, it will be truncated. If there are no messages available the method will block until the request can be satisfied.

recvmsg( $flags = 0)

Receive a message part. Returns a ZMQ::Raw::Message object.

setsockopt( $option, $value )

Set a socket option.

CONSTANTS

ZMQ_AFFINITY

ZMQ_IDENTITY

ZMQ_SUBSCRIBE

ZMQ_UNSUBSCRIBE

ZMQ_RATE

ZMQ_RECOVERY_IVL

ZMQ_SNDBUF

ZMQ_RCVBUF

ZMQ_RCVMORE

ZMQ_FD

ZMQ_EVENTS

ZMQ_TYPE

ZMQ_LINGER

ZMQ_RECONNECT_IVL

ZMQ_BACKLOG

ZMQ_RECONNECT_IVL_MAX

ZMQ_MAX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D

AUTHOR

Jacques Germishuys <jacquesg@striata.com>

LICENSE AND COPYRIGHT

Copyright 2017 Jacques Germishuys.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.