diff options
| author | Garrett D'Amore <garrett@damore.org> | 2018-01-29 13:27:52 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2018-01-29 13:27:52 -0800 |
| commit | 5914e40c2ff7fcf346c90705785f3fb7650a9fdc (patch) | |
| tree | d769f4110a76679df0ffcf2b4e953bb9b9f3687d /src/transport | |
| parent | e32022c8085fc6b05ed690f9b4b49536d8df13b1 (diff) | |
| download | nng-5914e40c2ff7fcf346c90705785f3fb7650a9fdc.tar.gz nng-5914e40c2ff7fcf346c90705785f3fb7650a9fdc.tar.bz2 nng-5914e40c2ff7fcf346c90705785f3fb7650a9fdc.zip | |
Expose scatter/gather I/O vectors; we will use for HTTP API.
Diffstat (limited to 'src/transport')
| -rw-r--r-- | src/transport/ipc/ipc.c | 4 | ||||
| -rw-r--r-- | src/transport/tcp/tcp.c | 4 | ||||
| -rw-r--r-- | src/transport/tls/tls.c | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/transport/ipc/ipc.c b/src/transport/ipc/ipc.c index 62751d86..9e8a3829 100644 --- a/src/transport/ipc/ipc.c +++ b/src/transport/ipc/ipc.c @@ -233,7 +233,7 @@ nni_ipc_pipe_send_cb(void *arg) NNI_ASSERT(txaio->a_niov != 0); if (txaio->a_iov[0].iov_len > n) { txaio->a_iov[0].iov_len -= n; - txaio->a_iov[0].iov_buf += n; + NNI_INCPTR(txaio->a_iov[0].iov_buf, n); break; } n -= txaio->a_iov[0].iov_len; @@ -285,7 +285,7 @@ nni_ipc_pipe_recv_cb(void *arg) NNI_ASSERT(rxaio->a_niov != 0); if (rxaio->a_iov[0].iov_len > n) { rxaio->a_iov[0].iov_len -= n; - rxaio->a_iov[0].iov_buf += n; + NNI_INCPTR(rxaio->a_iov[0].iov_buf, n); break; } n -= rxaio->a_iov[0].iov_len; diff --git a/src/transport/tcp/tcp.c b/src/transport/tcp/tcp.c index 0a123a79..28ec9438 100644 --- a/src/transport/tcp/tcp.c +++ b/src/transport/tcp/tcp.c @@ -230,7 +230,7 @@ nni_tcp_pipe_send_cb(void *arg) NNI_ASSERT(txaio->a_niov != 0); if (txaio->a_iov[0].iov_len > n) { txaio->a_iov[0].iov_len -= n; - txaio->a_iov[0].iov_buf += n; + NNI_INCPTR(txaio->a_iov[0].iov_buf, n); break; } n -= txaio->a_iov[0].iov_len; @@ -280,7 +280,7 @@ nni_tcp_pipe_recv_cb(void *arg) NNI_ASSERT(rxaio->a_niov != 0); if (rxaio->a_iov[0].iov_len > n) { rxaio->a_iov[0].iov_len -= n; - rxaio->a_iov[0].iov_buf += n; + NNI_INCPTR(rxaio->a_iov[0].iov_buf, n); break; } n -= rxaio->a_iov[0].iov_len; diff --git a/src/transport/tls/tls.c b/src/transport/tls/tls.c index 6bc884e7..f6c5bc6e 100644 --- a/src/transport/tls/tls.c +++ b/src/transport/tls/tls.c @@ -238,7 +238,7 @@ nni_tls_pipe_send_cb(void *arg) NNI_ASSERT(txaio->a_niov != 0); if (txaio->a_iov[0].iov_len > n) { txaio->a_iov[0].iov_len -= n; - txaio->a_iov[0].iov_buf += n; + NNI_INCPTR(txaio->a_iov[0].iov_buf, n); break; } n -= txaio->a_iov[0].iov_len; @@ -288,7 +288,7 @@ nni_tls_pipe_recv_cb(void *arg) NNI_ASSERT(rxaio->a_niov != 0); if (rxaio->a_iov[0].iov_len > n) { rxaio->a_iov[0].iov_len -= n; - rxaio->a_iov[0].iov_buf += n; + NNI_INCPTR(rxaio->a_iov[0].iov_buf, n); break; } n -= rxaio->a_iov[0].iov_len; |
