Go to the documentation of this file.
16 char *sequence =
s_recv (zap_);
19 char *routing_id =
s_recv (zap_);
20 char *mechanism =
s_recv (zap_);
21 char *username =
s_recv (zap_);
22 char *password =
s_recv (zap_);
30 if (
streq (username,
"admin") &&
streq (password,
"password")) {
86 const int as_server = 1;
115 const char username[] =
"admin";
118 const char password[] =
"password";
133 const int as_server = 1;
145 const char username[] =
"wronguser";
146 const char password[] =
"wrongpass";
161 send (
s,
"\x01\x00", 2, 0);
163 send (
s,
"\x08\x00sneaky\0", 9, 0);
168 printf (
"Received unauthenticated message: %s\n",
buf);
static void bounce(void *socket_)
#define TEST_ASSERT_EQUAL_STRING(expected, actual)
#define ZMQ_PLAIN_USERNAME
static void teardown_server()
ZMQ_EXPORT void * zmq_threadstart(zmq_thread_fn *func_, void *arg_)
static void setup_server()
#define ZMQ_PLAIN_PASSWORD
void setup_test_context()
void bind_loopback_ipv4(void *socket_, char *my_endpoint_, size_t len_)
void teardown_test_context()
void * get_test_context()
void send(fd_t fd_, const char(&data_)[N])
void test_plain_wrong_credentials_fails()
void * test_context_socket_close_zero_linger(void *socket_)
char * s_recv(void *socket_)
ZMQ_EXPORT int zmq_connect(void *s_, const char *addr_)
void test_plain_client_as_server_fails()
char my_endpoint[MAX_SOCKET_STRING]
ZMQ_EXPORT int zmq_setsockopt(void *s_, int option_, const void *optval_, size_t optvallen_)
ZMQ_EXPORT void zmq_threadclose(void *thread_)
fd_t connect_socket(const char *endpoint_, const int af_, const int protocol_)
#define MAX_SOCKET_STRING
ZMQ_EXPORT int zmq_bind(void *s_, const char *addr_)
static void zap_handler(void *zap_)
GLbitfield GLuint64 timeout
ZMQ_EXPORT void * zmq_socket(void *, int type_)
static void setup_zap_handler()
void * test_context_socket(int type_)
GLenum GLuint GLenum GLsizei const GLchar * buf
bool streq(const char *lhs_, const char *rhs_)
ZMQ_EXPORT int zmq_close(void *s_)
void expect_bounce_fail(void *server_, void *client_)
void send_string_expect_success(void *socket_, const char *str_, int flags_)
void setup_test_environment(int timeout_seconds_)
static void teardown_zap_handler()
void * test_context_socket_close(void *socket_)
#define TEST_ASSERT_SUCCESS_ERRNO(expr)
void test_plain_vanilla_socket()
void test_plain_success()
#define TEST_ASSERT_NULL(pointer)
libaditof
Author(s):
autogenerated on Wed May 21 2025 02:06:59