Permalink
Browse files

zsocket_bind no longer reuses dynamic ports

  • Loading branch information...
1 parent 8ecc6e4 commit 6dcb86569aa4728e36c8ec35c085152559cace9e @hintjens committed Oct 27, 2012
Showing with 205 additions and 18 deletions.
  1. +3 −1 NEWS
  2. +1 −0 doc/Makefile.am
  3. +1 −1 doc/zclock.txt
  4. +1 −1 doc/zctx.txt
  5. +1 −1 doc/zfile.txt
  6. +3 −3 doc/zframe.txt
  7. +5 −1 doc/zhash.txt
  8. +2 −2 doc/zloop.txt
  9. +1 −1 doc/zmsg.txt
  10. +54 −0 doc/zmutex.txt
  11. +2 −2 doc/zsocket.txt
  12. +99 −1 doc/zsockopt.txt
  13. +1 −1 doc/zstr.txt
  14. +1 −1 doc/zthread.txt
  15. +30 −2 src/zsocket.c
View
@@ -1,9 +1,11 @@
-CZMQ version 1.3.0 (stable), released on 2012/xx/xx
+CZMQ version 1.3.1 (stable), released on 2012/10/27
===================================================
Changes
-------
+* See git log.
+
CZMQ version 1.2.0 (stable), released on 2012/08/06
===================================================
View
@@ -9,6 +9,7 @@ MAN7 = czmq.7 \
zlist.7 \
zloop.7 \
zmsg.7 \
+ zmutex.7 \
zsocket.7 \
zsockopt.7 \
zstr.7 \
View
@@ -23,7 +23,7 @@ CZMQ_EXPORT void
// Self test of this class
int
- zclock_test (Bool verbose);
+ zclock_test (bool verbose);
----
DESCRIPTION
View
@@ -39,7 +39,7 @@ CZMQ_EXPORT void *
// Self test of this class
int
- zctx_test (Bool verbose);
+ zctx_test (bool verbose);
// Global signal indicator, TRUE when user presses Ctrl-C or the process
// gets a SIGTERM signal.
View
@@ -26,7 +26,7 @@ CZMQ_EXPORT ssize_t
// Self test of this class
int
- zfile_test (Bool verbose);
+ zfile_test (bool verbose);
----
DESCRIPTION
View
@@ -65,7 +65,7 @@ CZMQ_EXPORT char *
zframe_strdup (zframe_t *self);
// Return TRUE if frame body is equal to string, excluding terminator
-CZMQ_EXPORT Bool
+CZMQ_EXPORT bool
zframe_streq (zframe_t *self, const char *string);
// Return frame zero copy indicator (1 or 0)
@@ -78,7 +78,7 @@ CZMQ_EXPORT int
// Return TRUE if two frames have identical size and data
// If either frame is NULL, equality is always false.
-CZMQ_EXPORT Bool
+CZMQ_EXPORT bool
zframe_eq (zframe_t *self, zframe_t *other);
// Print contents of frame to stderr
@@ -91,7 +91,7 @@ CZMQ_EXPORT void
// Self test of this class
int
- zframe_test (Bool verbose);
+ zframe_test (bool verbose);
----
DESCRIPTION
View
@@ -62,6 +62,10 @@ CZMQ_EXPORT size_t
// Make copy of hash table
CZMQ_EXPORT zhash_t *
zhash_dup (zhash_t *self);
+
+// Return keys for items in table
+CZMQ_EXPORT zlist_t *
+ zhash_keys (zhash_t *self);
// Apply function to each item in the hash table. Items are iterated in no
// defined order. Stops if callback function returns non-zero and returns
@@ -149,7 +153,7 @@ EXAMPLE
// Check that the queue is robust against random usage
struct {
char name [100];
- Bool exists;
+ bool exists;
} testset [200];
memset (testset, 0, sizeof (testset));
int testmax = 200, testnbr, iteration;
View
@@ -45,7 +45,7 @@ CZMQ_EXPORT int
// Set verbose tracing of reactor on/off
CZMQ_EXPORT void
- zloop_set_verbose (zloop_t *self, Bool verbose);
+ zloop_set_verbose (zloop_t *self, bool verbose);
// Start the reactor. Takes control of the thread and returns when the 0MQ
// context is terminated or the process is interrupted, or any event handler
@@ -56,7 +56,7 @@ CZMQ_EXPORT int
// Self test of this class
int
- zloop_test (Bool verbose);
+ zloop_test (bool verbose);
----
DESCRIPTION
View
@@ -122,7 +122,7 @@ CZMQ_EXPORT void
// Self test of this class
int
- zmsg_test (Bool verbose);
+ zmsg_test (bool verbose);
----
DESCRIPTION
View
@@ -0,0 +1,54 @@
+zmutex(7)
+=========
+
+NAME
+----
+zmutex - working with mutexes
+
+SYNOPSIS
+--------
+----
+// Create a new mutex container
+CZMQ_EXPORT zmutex_t *
+ zmutex_new (void);
+
+// Destroy a mutex container
+CZMQ_EXPORT void
+ zmutex_destroy (zmutex_t **self_p);
+
+// Lock mutex
+CZMQ_EXPORT void
+ zmutex_lock (zmutex_t *self);
+
+// Unlock mutex
+CZMQ_EXPORT void
+ zmutex_unlock (zmutex_t *self);
+
+// Self test of this class
+int
+ zmutex_test (bool verbose);
+----
+
+DESCRIPTION
+-----------
+
+The zmutex class provides a portable wrapper for mutexes. Please do not
+use this class to do multi-threading. It is for the rare case where you
+absolutely need thread-safe global state. This should happen in system
+code only. DO NOT USE THIS TO SHARE SOCKETS BETWEEN THREADS, OR DARK
+THINGS WILL HAPPEN TO YOUR CODE.
+
+
+EXAMPLE
+-------
+.From zmutex_test method
+----
+ zmutex_t *mutex = zmutex_new ();
+ zmutex_lock (mutex);
+ zmutex_unlock (mutex);
+ zmutex_destroy (&mutex);
+----
+
+SEE ALSO
+--------
+linkczmq:czmq[7]
View
@@ -45,7 +45,7 @@ CZMQ_EXPORT int
// Poll for input events on the socket. Returns TRUE if there is input
// ready on the socket, else FALSE.
-CZMQ_EXPORT Bool
+CZMQ_EXPORT bool
zsocket_poll (void *socket, int msecs);
// Returns socket type as printable constant string
@@ -54,7 +54,7 @@ CZMQ_EXPORT char *
// Self test of this class
int
- zsocket_test (Bool verbose);
+ zsocket_test (bool verbose);
----
DESCRIPTION
Oops, something went wrong.

0 comments on commit 6dcb865

Please sign in to comment.