From 56619463ac26dc6c3e576d2fbf6b544eebeb5148 Mon Sep 17 00:00:00 2001 From: Martin Lucina Date: Sun, 20 May 2012 11:24:59 +0200 Subject: Imported Upstream version 2.2.0 --- doc/zmq_cpp.html | 275 +++++++++++++++++++++++++++++++++---------------------- 1 file changed, 164 insertions(+), 111 deletions(-) (limited to 'doc/zmq_cpp.html') diff --git a/doc/zmq_cpp.html b/doc/zmq_cpp.html index c59c01d..ff44f57 100644 --- a/doc/zmq_cpp.html +++ b/doc/zmq_cpp.html @@ -2,15 +2,28 @@ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> - - + + zmq_cpp(7) - +
+

SYNOPSIS

#include <zmq.hpp>

c++ [flags] files -lzmq [libraries]

+
+

DESCRIPTION

This manual page describes how the ØMQ C++ language binding maps to the @@ -592,126 +611,151 @@ underlying ØMQ C library functions.

All ØMQ constants defined by zmq.h are also available to the C++ language binding.

The following classes are provided in the zmq namespace:

-

Context

+
+

Context

The context_t class encapsulates functionality dealing with the initialisation and termination of a ØMQ context.

+

Constructor

-
context_t::context_t(int io_threads)
-
+
context_t::context_t(int io_threads)
+

Maps to the zmq_init() function, as described in zmq_init(3).

+
+

Destructor

-
context_t::~context_t(void)
-
+
context_t::~context_t(void)
+

Maps to the zmq_term() function, as described in zmq_term(3).

+
+

Methods

None.

-

Socket

+
+
+
+

Socket

The socket_t class encapsulates a ØMQ socket.

+

Constructor

-
socket_t::socket_t(context_t &context, int type)
-
+
socket_t::socket_t(context_t &context, int type)
+

Maps to the zmq_socket() function, as described in zmq_socket(3).

+
+

Destructor

-
socket_t::~socket_t(void)
-
+
socket_t::~socket_t(void)
+

Calls the zmq_close() function, as described in zmq_close(3).

+
+

Methods

-
void socket_t::getsockopt(int option_name, void *option_value, size_t -*option_len)
-
+
void socket_t::getsockopt(int option_name, void *option_value, size_t
+*option_len)
+

Maps to the zmq_getsockopt() function, as described in zmq_getsockopt(3).

-
void socket_t::setsockopt(int option_name, const void *option_value, size_t -option_len)
-
+
void socket_t::setsockopt(int option_name, const void *option_value, size_t
+option_len)
+

Maps to the zmq_setsockopt() function, as described in zmq_setsockopt(3).

-
void socket_t::bind(const char *endpoint)
-
+
void socket_t::bind(const char *endpoint)
+

Maps to the zmq_bind() function, as described in zmq_bind(3).

-
void socket_t::connect(const char *endpoint)
-
+
void socket_t::connect(const char *endpoint)
+

Maps to the zmq_connect() function, as described in zmq_connect(3).

-
bool socket_t::send(message_t &msg, int flags = 0)
-
+
bool socket_t::send(message_t &msg, int flags = 0)
+

Maps to the zmq_send() function, as described in zmq_send(3). Returns true if message is successfully sent, false if it is not.

-
bool socket_t::recv(message_t *msg, int flags = 0)
-
+
bool socket_t::recv(message_t *msg, int flags = 0)
+

Maps to the zmq_recv() function, as described in zmq_recv(3). Returns true if message is successfully received, false if it is not.

-

Message

+
+
+
+

Message

The zmq::message_t class encapsulates the zmq_msg_t structure and functions to construct, destruct and manipulate ØMQ messages.

+

Constructor

-
message_t::message_t(void) +
message_t::message_t(void)
 message_t::message_t(size_t size)
-message_t::message_t(void *data, size_t size, free_fn *ffn)
-
+message_t::message_t(void *data, size_t size, free_fn *ffn) +

These map to the zmq_msg_init(), zmq_msg_init_size() and zmq_msg_init_data() functions, described in zmq_msg_init(3), zmq_msg_init_size(3) and zmq_msg_init_data(3) respectively.

+
+

Destructor

-
message_t::~message_t(void)
-
+
message_t::~message_t(void)
+

Calls the zmq_msg_close() function, as described in zmq_msg_close(3).

+
+

Methods

-
void *message_t::data (void)
-
+
void *message_t::data (void)
+

Maps to the zmq_msg_data() function, as described in zmq_msg_data(3).

-
size_t message_t::size (void)
-
+
size_t message_t::size (void)
+

Maps to the zmq_msg_size() function, as described in zmq_msg_size(3).

-
void message_t::copy (message_t *src)
-
+
void message_t::copy (message_t *src)
+

Maps to the zmq_msg_copy() function, as described in zmq_msg_copy(3).

-
void message_t::move (message_t *src)
-
+
void message_t::move (message_t *src)
+

Maps to the zmq_msg_move() function, as described in zmq_msg_move(3).

-
message_t::rebuild(void) +
message_t::rebuild(void)
 message_t::rebuild(size_t size)
-message_t::rebuild(void *data, size_t size, free_fn *ffn)
-
+message_t::rebuild(void *data, size_t size, free_fn *ffn) +

Equivalent to calling the zmq_msg_close() function followed by the corresponding zmq_msg_init() function.

-

Input/output multiplexing

+
+
+
+

Input/output multiplexing

-
int poll (zmq_pollitem_t *items, int nitems, long timeout = -1)
-
+
int poll (zmq_pollitem_t *items, int nitems, long timeout = -1)
+

The poll() function is a namespaced equivalent of the zmq_poll() function, as described in zmq_poll(3).

@@ -725,6 +769,9 @@ should cast an instance of the socket_t class to (void *).
+
+
+

ERROR HANDLING

All errors reported by the underlying ØMQ C library functions are automatically @@ -732,6 +779,8 @@ converted to exceptions by the C++ language binding. The zmq::error_t is derived from the std::exception class and uses the zmq_strerror() function to convert the error code to human-readable string.

+
+

EXAMPLE

@@ -744,21 +793,25 @@ memset (msg.data (), 0, 100); s.send (msg);
+
+

SEE ALSO

+
+

AUTHORS

-

This ØMQ manual page was written by Martin Sustrik <sustrik@250bpm.com> and -Martin Lucina <mato@kotelna.sk>.

+

This manual page was written by the ØMQ community.

+

-- cgit v1.2.3