![]() |
libzmq
master
ZeroMQ C++ Core Engine (LIBZMQ)
|
#include "../src/platform.hpp"
#include "../include/zmq.h"
#include "../src/stdint.hpp"
#include <time.h>
#include <assert.h>
#include <stdarg.h>
#include <string>
#include <string.h>
#include <pthread.h>
#include <unistd.h>
#include <signal.h>
#include <stdlib.h>
#include <sys/wait.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
Go to the source code of this file.
Macros | |
#define | SETTLE_TIME 300 |
#define | streq(s1, s2) (!strcmp ((s1), (s2))) |
#define | strneq(s1, s2) (strcmp ((s1), (s2))) |
Functions | |
void | bounce (void *server, void *client) |
void | close_zero_linger (void *socket) |
void | expect_bounce_fail (void *server, void *client) |
int | is_ipv6_available (void) |
void | msleep (int milliseconds) |
char * | s_recv (void *socket) |
void | s_recv_seq (void *socket,...) |
int | s_send (void *socket, const char *string) |
void | s_send_seq (void *socket,...) |
int | s_sendmore (void *socket, const char *string) |
void | setup_test_environment (void) |
Variables | |
const char * | SEQ_END = (const char *) 1 |
#define SETTLE_TIME 300 |
Definition at line 44 of file testutil.hpp.
Referenced by get_monitor_event(), main(), test_connect_before_bind_pub_sub(), test_ctx_shutdown(), test_decrease_when_full(), test_destroy_queue_on_disconnect(), test_envelope(), test_fair_queue_in(), test_heartbeat_notimeout(), test_heartbeat_ttl(), test_missing_subscriptions(), test_pull_fair_queue_in(), test_push_round_robin_out(), test_req_message_format(), test_req_only_listens_to_current_peer(), test_reset_hwm(), test_round_robin_out(), and test_xpub_proxy_unsubscribe_on_disconnect().
#define streq | ( | s1, | |
s2 | |||
) | (!strcmp ((s1), (s2))) |
Definition at line 195 of file testutil.hpp.
Referenced by main(), test_stream_to_dealer(), and zap_handler().
#define strneq | ( | s1, | |
s2 | |||
) | (strcmp ((s1), (s2))) |
Definition at line 196 of file testutil.hpp.
void bounce | ( | void * | server, |
void * | client | ||
) |
Definition at line 73 of file testutil.hpp.
References zmq_getsockopt(), ZMQ_RCVMORE, zmq_recv(), zmq_send(), and ZMQ_SNDMORE.
Referenced by main(), run_test(), test_pair(), and test_req_rep().
void close_zero_linger | ( | void * | socket | ) |
Definition at line 275 of file testutil.hpp.
References ETERM, zmq_close(), ZMQ_LINGER, and zmq_setsockopt().
Referenced by main(), run_test(), test_destroy_queue_on_disconnect(), test_envelope(), test_fair_queue_in(), test_pull_fair_queue_in(), test_push_round_robin_out(), test_req_message_format(), test_req_only_listens_to_current_peer(), test_round_robin_out(), and zap_handler().
void expect_bounce_fail | ( | void * | server, |
void * | client | ||
) |
Definition at line 128 of file testutil.hpp.
References zmq_errno(), ZMQ_RCVTIMEO, zmq_recv(), zmq_send(), zmq_setsockopt(), ZMQ_SNDMORE, and ZMQ_SNDTIMEO.
Referenced by main().
int is_ipv6_available | ( | void | ) |
Definition at line 328 of file testutil.hpp.
References bind.
Referenced by main().
void msleep | ( | int | milliseconds | ) |
Definition at line 316 of file testutil.hpp.
Referenced by get_monitor_event(), main(), server_worker(), test_connect_before_bind_pub_sub(), test_ctx_shutdown(), test_decrease_when_full(), test_destroy_queue_on_disconnect(), test_envelope(), test_fair_queue_in(), test_heartbeat_notimeout(), test_heartbeat_ttl(), test_missing_subscriptions(), test_pull_fair_queue_in(), test_push_round_robin_out(), test_req_message_format(), test_req_only_listens_to_current_peer(), test_reset_hwm(), test_round_robin_out(), and test_xpub_proxy_unsubscribe_on_disconnect().
char* s_recv | ( | void * | socket | ) |
Definition at line 170 of file testutil.hpp.
References size, and zmq_recv().
Referenced by main(), and zap_handler().
void s_recv_seq | ( | void * | socket, |
... | |||
) |
Definition at line 236 of file testutil.hpp.
References SEQ_END, zmq_getsockopt(), zmq_msg_close(), zmq_msg_data(), zmq_msg_init(), zmq_msg_recv(), zmq_msg_size(), and ZMQ_RCVMORE.
Referenced by main(), test_envelope(), test_fair_queue_in(), test_push_round_robin_out(), test_req_message_format(), test_req_only_listens_to_current_peer(), and test_round_robin_out().
int s_send | ( | void * | socket, |
const char * | string | ||
) |
Definition at line 183 of file testutil.hpp.
References size, and zmq_send().
Referenced by main(), and zap_handler().
void s_send_seq | ( | void * | socket, |
... | |||
) |
Definition at line 205 of file testutil.hpp.
References SEQ_END, zmq_send(), and ZMQ_SNDMORE.
Referenced by main(), test_destroy_queue_on_disconnect(), test_envelope(), test_fair_queue_in(), test_pull_fair_queue_in(), test_push_round_robin_out(), test_req_message_format(), test_req_only_listens_to_current_peer(), and test_round_robin_out().
int s_sendmore | ( | void * | socket, |
const char * | string | ||
) |
Definition at line 190 of file testutil.hpp.
References size, zmq_send(), and ZMQ_SNDMORE.
Referenced by main(), and zap_handler().
void setup_test_environment | ( | void | ) |
Definition at line 285 of file testutil.hpp.
Referenced by main().
const char* SEQ_END = (const char *) 1 |
Definition at line 198 of file testutil.hpp.
Referenced by main(), s_recv_seq(), s_send_seq(), test_destroy_queue_on_disconnect(), test_envelope(), test_fair_queue_in(), test_pull_fair_queue_in(), test_push_round_robin_out(), test_req_message_format(), test_req_only_listens_to_current_peer(), and test_round_robin_out().