libzmq  master
ZeroMQ C++ Core Engine (LIBZMQ)
test_proxy.cpp File Reference
#include "testutil.hpp"
Include dependency graph for test_proxy.cpp:

Go to the source code of this file.

Macros

#define CONTENT_SIZE   13
 
#define CONTENT_SIZE_MAX   32
 
#define ID_SIZE   10
 
#define ID_SIZE_MAX   32
 
#define is_verbose   0
 
#define QT_CLIENTS   3
 
#define QT_WORKERS   5
 

Functions

static void client_task (void *ctx)
 
int main (void)
 
void server_task (void *ctx)
 
static void server_worker (void *ctx)
 

Macro Definition Documentation

#define CONTENT_SIZE   13

Definition at line 45 of file test_proxy.cpp.

Referenced by client_task(), and server_worker().

#define CONTENT_SIZE_MAX   32

Definition at line 46 of file test_proxy.cpp.

Referenced by client_task(), and server_worker().

#define ID_SIZE   10

Definition at line 47 of file test_proxy.cpp.

Referenced by client_task(), and server_worker().

#define ID_SIZE_MAX   32

Definition at line 48 of file test_proxy.cpp.

Referenced by server_worker().

#define is_verbose   0

Definition at line 51 of file test_proxy.cpp.

Referenced by client_task(), and server_worker().

#define QT_CLIENTS   3

Definition at line 50 of file test_proxy.cpp.

Referenced by main().

#define QT_WORKERS   5

Definition at line 49 of file test_proxy.cpp.

Referenced by server_task().

Function Documentation

static void client_task ( void *  ctx)
static

Definition at line 54 of file test_proxy.cpp.

References CONTENT_SIZE, CONTENT_SIZE_MAX, ID_SIZE, is_verbose, server_worker(), zmq_close(), zmq_connect(), ZMQ_DEALER, zmq_getsockopt(), ZMQ_IDENTITY, ZMQ_LINGER, zmq_poll(), ZMQ_POLLIN, ZMQ_RCVMORE, zmq_recv(), zmq_send(), zmq_setsockopt(), zmq_socket(), ZMQ_SUB, and ZMQ_SUBSCRIBE.

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

void server_task ( void *  ctx)

Definition at line 131 of file test_proxy.cpp.

References QT_WORKERS, server_worker(), zmq_bind(), zmq_close(), zmq_connect(), ZMQ_DEALER, ZMQ_LINGER, zmq_proxy_steerable(), ZMQ_ROUTER, zmq_setsockopt(), zmq_socket(), ZMQ_SUB, ZMQ_SUBSCRIBE, zmq_threadclose(), and zmq_threadstart().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

static void server_worker ( void *  ctx)
static

Definition at line 186 of file test_proxy.cpp.

References CONTENT_SIZE, CONTENT_SIZE_MAX, ID_SIZE, ID_SIZE_MAX, is_verbose, msleep(), worker(), zmq_close(), zmq_connect(), ZMQ_DEALER, ZMQ_DONTWAIT, ZMQ_LINGER, zmq_recv(), zmq_send(), zmq_setsockopt(), ZMQ_SNDMORE, zmq_socket(), ZMQ_SUB, and ZMQ_SUBSCRIBE.

Referenced by client_task(), and server_task().

Here is the call graph for this function:

Here is the caller graph for this function: