diff options
author | Max Romanov <max.romanov@nginx.com> | 2017-07-12 20:32:16 +0300 |
---|---|---|
committer | Max Romanov <max.romanov@nginx.com> | 2017-07-12 20:32:16 +0300 |
commit | b0c1e740cf404f8fed5eed75fddb205ca74314e0 (patch) | |
tree | 08dcefc827c5dfb1570b682ea8d1e9abf17a31dc /src/nxt_buf.h | |
parent | c38bcb7d70729434893ae4d5f2f58a78a36d2bd5 (diff) | |
download | unit-b0c1e740cf404f8fed5eed75fddb205ca74314e0.tar.gz unit-b0c1e740cf404f8fed5eed75fddb205ca74314e0.tar.bz2 |
New process port exchange changed. READY message type introduced.
Application process start request DATA message from router to master.
Master notifies router via NEW_PORT message after worker process become ready.
Diffstat (limited to 'src/nxt_buf.h')
-rw-r--r-- | src/nxt_buf.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/nxt_buf.h b/src/nxt_buf.h index ae96b24a..2e896093 100644 --- a/src/nxt_buf.h +++ b/src/nxt_buf.h @@ -258,5 +258,20 @@ nxt_buf_free(mp, b) \ NXT_EXPORT void nxt_buf_chain_add(nxt_buf_t **head, nxt_buf_t *in); NXT_EXPORT size_t nxt_buf_chain_length(nxt_buf_t *b); +nxt_inline nxt_buf_t * +nxt_buf_cpy(nxt_buf_t *b, const void *src, size_t length) +{ + nxt_memcpy(b->mem.free, src, length); + b->mem.free += length; + + return b; +} + +nxt_inline nxt_buf_t * +nxt_buf_cpystr(nxt_buf_t *b, const nxt_str_t *str) +{ + return nxt_buf_cpy(b, str->start, str->length); +} + #endif /* _NXT_BUF_H_INCLIDED_ */ |