diff options
| author | Garrett D'Amore <garrett@damore.org> | 2017-01-23 22:49:57 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2017-01-23 22:49:57 -0800 |
| commit | 7df0822d3ed58ee73918cac576c0b07363e84425 (patch) | |
| tree | 5cae69dc0dc3e609260e0bd99bb8743c1c1a28cc /src/nng_compat.h | |
| parent | 91a0b46b6a63f1c2345279b831a02c972e7b1781 (diff) | |
| download | nng-7df0822d3ed58ee73918cac576c0b07363e84425.tar.gz nng-7df0822d3ed58ee73918cac576c0b07363e84425.tar.bz2 nng-7df0822d3ed58ee73918cac576c0b07363e84425.zip | |
Added a bunch more compatibility stuff.
I implemented the reqrep compatibility test, which uncovered a few
semantic issues I had in the REQ/REP protocol, which I've fixed.
There are still missing things. and at least one portion of the req/rep
test suite cannot be enabled until I add tuning of the reconnect timeout,
which is currently way too long (1 sec) for the test suite to work.
Diffstat (limited to 'src/nng_compat.h')
| -rw-r--r-- | src/nng_compat.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/nng_compat.h b/src/nng_compat.h index c49a33db..64ace069 100644 --- a/src/nng_compat.h +++ b/src/nng_compat.h @@ -193,7 +193,7 @@ extern "C" { #define NN_LINGER 1 #define NN_SNDBUF 2 #define NN_RCVBUF 3 -#define NN_SNDTIMEO 5 +#define NN_SNDTIMEO 4 #define NN_RCVTIMEO 5 #define NN_RECONNECT_IVL 6 #define NN_RECONNECT_IVL_MAX 7 @@ -210,7 +210,8 @@ extern "C" { // Protocol-specific options. To simplify thins we encode the protocol // level in the option. -#define NN_SUB_UNSUBSCRIBE (NN_SUB * 16 + 1) +#define NN_SUB_SUBSCRIBE (NN_SUB * 16 + 1) +#define NN_SUB_UNSUBSCRIBE (NN_SUB * 16 + 2) #define NN_REQ_RESEND_IVL (NN_REQ * 16 + 1) #define NN_SURVEY_DEADLINE (NN_SURVEYOR * 16 + 1) @@ -294,6 +295,8 @@ NN_DECL uint64_t nn_get_statistic(int, int); NN_DECL void *nn_allocmsg(size_t, int); NN_DECL void *nn_reallocmsg(void *, size_t); NN_DECL int nn_freemsg(void *); +NN_DECL int nn_errno(void); +NN_DECL const char *nn_strerror(int); #ifdef __cplusplus } |
