// This port range is defined by IANA for dynamic or private ports // We use this when choosing a port for dynamic binding. #define ZSOCKET_DYNFROM 0xc000 #define ZSOCKET_DYNTO 0xffff
// Callback function for zero-copy methods typedef void (zsocket_free_fn) (void *data, void *arg);
// Destroy a socket within our CZMQ context, replaces zmq_close. CZMQ_EXPORT void zsocket_destroy (zctx_t *ctx, void *self);
// Unbind a socket from a formatted endpoint. // Returns 0 if OK, -1 if the endpoint was invalid or the function // isn't supported. CZMQ_EXPORT int zsocket_unbind (void *self, const char *format, ...);
// Connect a socket to a formatted endpoint // Returns 0 if OK, -1 if the endpoint was invalid. CZMQ_EXPORT int zsocket_connect (void *self, const char *format, ...);
// Disconnect a socket from a formatted endpoint // Returns 0 if OK, -1 if the endpoint was invalid or the function // isn't supported. CZMQ_EXPORT int zsocket_disconnect (void *self, const char *format, ...);
// Poll for input events on the socket. Returns TRUE if there is input // ready on the socket, else FALSE. CZMQ_EXPORT bool zsocket_poll (void *self, int msecs);
// Returns socket type as printable constant string CZMQ_EXPORT const char * zsocket_type_str (void *self);
// Send data over a socket as a single message frame. // Accepts these flags: ZFRAME_MORE and ZFRAME_DONTWAIT. // Returns -1 on error, 0 on success CZMQ_EXPORT int zsocket_sendmem (void *self, const void *data, size_t size, int flags);
// Send a signal over a socket. A signal is a zero-byte message. // Signals are used primarily between threads, over pipe sockets. // Returns -1 if there was an error sending the signal. CZMQ_EXPORT int zsocket_signal (void *self);
// Self test of this class CZMQ_EXPORT void zsocket_test (bool verbose);
|