From b0c1e740cf404f8fed5eed75fddb205ca74314e0 Mon Sep 17 00:00:00 2001 From: Max Romanov Date: Wed, 12 Jul 2017 20:32:16 +0300 Subject: 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. --- src/nxt_buf.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/nxt_buf.h') 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_ */ -- cgit