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/xs.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/xs.cpp')
| -rw-r--r-- | src/xs.cpp | 11 | 
1 files changed, 11 insertions, 0 deletions
@@ -212,6 +212,17 @@ int xs_connect (void *s_, const char *addr_)      return rc;  } +int xs_shutdown (void *s_, int how_) +{ +    xs::socket_base_t *s = (xs::socket_base_t*) s_; +    if (!s || !s->check_tag ()) { +        errno = ENOTSOCK; +        return -1; +    } +    int rc = s->shutdown (how_); +    return rc;      +} +  int xs_send (void *s_, const void *buf_, size_t len_, int flags_)  {      xs_msg_t msg;  | 
