diff options
author | Martin Sustrik <sustrik@250bpm.com> | 2012-04-21 07:07:57 +0200 |
---|---|---|
committer | Martin Sustrik <sustrik@250bpm.com> | 2012-04-21 07:07:57 +0200 |
commit | 36fd87810274329c8cd86344b95a0521541e7bab (patch) | |
tree | ec183c7dd3a9b1de3361e7211cbffc960d139cf1 /src/xszmq.cpp | |
parent | d26e86aa0afc3ec2534eacb4131aee8f6805c36a (diff) |
xs_shutdown implemented
This patch allows for partial shutdown of the socket.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Diffstat (limited to 'src/xszmq.cpp')
-rw-r--r-- | src/xszmq.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/xszmq.cpp b/src/xszmq.cpp index d7199f9..f6e6fa1 100644 --- a/src/xszmq.cpp +++ b/src/xszmq.cpp @@ -355,12 +355,14 @@ int zmq_getsockopt (void *s, int option, void *optval, int zmq_bind (void *s, const char *addr) { - return xs_bind (s, addr); + int rc = xs_bind (s, addr); + return rc < 0 ? -1 : 0; } int zmq_connect (void *s, const char *addr) { - return xs_connect (s, addr); + int rc = xs_connect (s, addr); + return rc < 0 ? -1 : 0; } int zmq_send (void *s, zmq_msg_t *msg, int flags) |