libzmq  master
ZeroMQ C++ Core Engine (LIBZMQ)
zmq_utils.cpp File Reference
#include "precompiled.hpp"
#include "macros.hpp"
#include "platform.hpp"
#include "clock.hpp"
#include "err.hpp"
#include "thread.hpp"
#include "atomic_counter.hpp"
#include "atomic_ptr.hpp"
#include <assert.h>
#include <unistd.h>
Include dependency graph for zmq_utils.cpp:

Go to the source code of this file.

Functions

int zmq_atomic_counter_dec (void *counter_)
 
void zmq_atomic_counter_destroy (void **counter_p_)
 
int zmq_atomic_counter_inc (void *counter_)
 
void * zmq_atomic_counter_new (void)
 
void zmq_atomic_counter_set (void *counter_, int value_)
 
int zmq_atomic_counter_value (void *counter_)
 
int zmq_curve_keypair (char *z85_public_key, char *z85_secret_key)
 
void zmq_sleep (int seconds_)
 
void * zmq_stopwatch_start ()
 
unsigned long zmq_stopwatch_stop (void *watch_)
 
void zmq_threadclose (void *thread)
 
void * zmq_threadstart (zmq_thread_fn *func, void *arg)
 
uint8_t * zmq_z85_decode (uint8_t *dest, const char *string)
 
char * zmq_z85_encode (char *dest, const uint8_t *data, size_t size)
 

Variables

static uint8_t decoder [96]
 
static char encoder [85+1]
 

Function Documentation

int zmq_atomic_counter_dec ( void *  counter_)

Definition at line 246 of file zmq_utils.cpp.

Referenced by main().

Here is the caller graph for this function:

void zmq_atomic_counter_destroy ( void **  counter_p_)

Definition at line 260 of file zmq_utils.cpp.

Referenced by main().

Here is the caller graph for this function:

int zmq_atomic_counter_inc ( void *  counter_)

Definition at line 238 of file zmq_utils.cpp.

Referenced by main().

Here is the caller graph for this function:

void* zmq_atomic_counter_new ( void  )

Definition at line 222 of file zmq_utils.cpp.

References alloc_assert.

Referenced by main().

Here is the caller graph for this function:

void zmq_atomic_counter_set ( void *  counter_,
int  value_ 
)

Definition at line 231 of file zmq_utils.cpp.

Referenced by main().

Here is the caller graph for this function:

int zmq_atomic_counter_value ( void *  counter_)

Definition at line 253 of file zmq_utils.cpp.

Referenced by main().

Here is the caller graph for this function:

int zmq_curve_keypair ( char *  z85_public_key,
char *  z85_secret_key 
)

Definition at line 191 of file zmq_utils.cpp.

References ENOTSUP, and zmq_z85_encode().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

void zmq_sleep ( int  seconds_)

Definition at line 53 of file zmq_utils.cpp.

Referenced by main().

Here is the caller graph for this function:

void* zmq_stopwatch_start ( void  )

Definition at line 62 of file zmq_utils.cpp.

References alloc_assert, and zmq::clock_t::now_us().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned long zmq_stopwatch_stop ( void *  watch_)

Definition at line 70 of file zmq_utils.cpp.

References zmq::clock_t::now_us().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

void zmq_threadclose ( void *  thread)

Definition at line 85 of file zmq_utils.cpp.

References LIBZMQ_DELETE, and zmq::thread_t::stop().

Referenced by main(), server_task(), test_ctx_shutdown(), test_multiple_threads(), and test_simultaneous_connect_bind_threads().

Here is the call graph for this function:

Here is the caller graph for this function:

void* zmq_threadstart ( zmq_thread_fn func,
void *  arg 
)

Definition at line 78 of file zmq_utils.cpp.

References zmq::thread_t::start().

Referenced by main(), server_task(), test_ctx_shutdown(), test_multiple_threads(), and test_simultaneous_connect_bind_threads().

Here is the call graph for this function:

Here is the caller graph for this function:

uint8_t* zmq_z85_decode ( uint8_t *  dest,
const char *  string 
)

Definition at line 158 of file zmq_utils.cpp.

References decoder.

Referenced by zmq::options_t::setsockopt().

Here is the caller graph for this function:

char* zmq_z85_encode ( char *  dest,
const uint8_t *  data,
size_t  size 
)

Definition at line 124 of file zmq_utils.cpp.

References encoder.

Referenced by zmq::options_t::getsockopt(), zap_handler(), and zmq_curve_keypair().

Here is the caller graph for this function:

Variable Documentation

uint8_t decoder[96]
static
Initial value:
= {
0x00, 0x44, 0x00, 0x54, 0x53, 0x52, 0x48, 0x00,
0x4B, 0x4C, 0x46, 0x41, 0x00, 0x3F, 0x3E, 0x45,
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
0x08, 0x09, 0x40, 0x00, 0x49, 0x42, 0x4A, 0x47,
0x51, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A,
0x2B, 0x2C, 0x2D, 0x2E, 0x2F, 0x30, 0x31, 0x32,
0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A,
0x3B, 0x3C, 0x3D, 0x4D, 0x00, 0x4E, 0x43, 0x00,
0x00, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10,
0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,
0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20,
0x21, 0x22, 0x23, 0x4F, 0x00, 0x50, 0x00, 0x00
}

Definition at line 103 of file zmq_utils.cpp.

Referenced by zmq_z85_decode().

char encoder[85+1]
static
Initial value:
= {
"0123456789" "abcdefghij" "klmnopqrst" "uvwxyzABCD"
"EFGHIJKLMN" "OPQRSTUVWX" "YZ.-:+=^!/" "*?&<>()[]{"
"}@%$#"
}

Definition at line 95 of file zmq_utils.cpp.

Referenced by zmq_z85_encode().