aboutsummaryrefslogtreecommitdiff
path: root/src/nng.c
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2016-12-28 22:51:24 -0800
committerGarrett D'Amore <garrett@damore.org>2016-12-28 22:51:24 -0800
commit3e7507f5908cda4b669bc57293e8395164fcc11a (patch)
tree12ed73a70398131b3e2e47639a0da409ef54bb7c /src/nng.c
parentdb7e8d5e05b4d266d87d059f207a20792b224983 (diff)
downloadnng-3e7507f5908cda4b669bc57293e8395164fcc11a.tar.gz
nng-3e7507f5908cda4b669bc57293e8395164fcc11a.tar.bz2
nng-3e7507f5908cda4b669bc57293e8395164fcc11a.zip
Define new NNG_ESTATE for dealing with protocol state errors.
This error code is set when a cooked mode protocol cannot support an operation yet. For example, it makes no sense to recv() a reply on a REQ socket if no request has been sent yet.
Diffstat (limited to 'src/nng.c')
-rw-r--r--src/nng.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nng.c b/src/nng.c
index 49671935..7c6c403f 100644
--- a/src/nng.c
+++ b/src/nng.c
@@ -166,6 +166,9 @@ nng_strerror(int num)
case NNG_EADDRINUSE:
return ("Address in use");
+ case NNG_ESTATE:
+ return ("Incorrect state");
+
default:
return ("Unknown error");
}