diff options
author | Igor Sysoev <igor@sysoev.ru> | 2017-02-22 15:09:59 +0300 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2017-02-22 15:09:59 +0300 |
commit | 029942f4eb7196c2cff0d0e26bc6ff274138f7d8 (patch) | |
tree | f4686c4d7b9cd574fe94c6f4918479a580fecf75 /src/nxt_sendbuf.h | |
parent | 059a8642898a6bd4b47d13a1c1d599cd44af7e1c (diff) | |
download | unit-029942f4eb7196c2cff0d0e26bc6ff274138f7d8.tar.gz unit-029942f4eb7196c2cff0d0e26bc6ff274138f7d8.tar.bz2 |
I/O operations refactoring.
Diffstat (limited to 'src/nxt_sendbuf.h')
-rw-r--r-- | src/nxt_sendbuf.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/nxt_sendbuf.h b/src/nxt_sendbuf.h index ca314e7b..71b18f91 100644 --- a/src/nxt_sendbuf.h +++ b/src/nxt_sendbuf.h @@ -36,6 +36,21 @@ typedef struct { + nxt_buf_t *buf; + nxt_socket_t socket; + nxt_err_t error; + nxt_off_t sent; + size_t size; + size_t limit; + + uint8_t ready; /* 1 bit */ + uint8_t once; /* 1 bit */ + uint8_t sync; /* 1 bit */ + uint8_t last; /* 1 bit */ +} nxt_sendbuf_t; + + +typedef struct { nxt_buf_t *buf; nxt_iobuf_t *iobuf; @@ -88,6 +103,8 @@ ssize_t nxt_event_conn_io_sendbuf(nxt_event_conn_t *c, nxt_buf_t *b, size_t limit); +nxt_uint_t nxt_sendbuf_mem_coalesce0(nxt_task_t *task, nxt_sendbuf_t *sb, + struct iovec *iov, nxt_uint_t niov_max); nxt_uint_t nxt_sendbuf_mem_coalesce(nxt_task_t *task, nxt_sendbuf_coalesce_t *sb); size_t nxt_sendbuf_file_coalesce(nxt_sendbuf_coalesce_t *sb); |