diff options
author | Martin Sustrik <sustrik@250bpm.com> | 2012-02-16 10:06:36 +0900 |
---|---|---|
committer | Martin Sustrik <sustrik@250bpm.com> | 2012-02-16 10:06:36 +0900 |
commit | a376c91494c954491fd424f3b51ab4579b9846a2 (patch) | |
tree | e306cef422138378720daa843703fc94331ad08e /src/xs.cpp | |
parent | fb1209c72bbfd431b61fa4588785586d24ef67c9 (diff) |
XS_CTX_MAX_SOCKETS option implemented
To implement context options properly, initialisation of context
is postponed till creation of the first socket. In the meantime
it is possible to set socket options.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Diffstat (limited to 'src/xs.cpp')
-rw-r--r-- | src/xs.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -169,6 +169,17 @@ int xs_term (void *ctx_) return rc; } +int xs_setctxopt (void *ctx_, int option_, const void *optval_, + size_t optvallen_) +{ + if (!ctx_ || !((xs::ctx_t*) ctx_)->check_tag ()) { + errno = EFAULT; + return -1; + } + + return ((xs::ctx_t*) ctx_)->setctxopt (option_, optval_, optvallen_); +} + void *xs_socket (void *ctx_, int type_) { if (!ctx_ || !((xs::ctx_t*) ctx_)->check_tag ()) { |