aboutsummaryrefslogtreecommitdiff
path: root/src/os/unix/ngx_sendv.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/os/unix/ngx_sendv.c')
-rw-r--r--src/os/unix/ngx_sendv.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/os/unix/ngx_sendv.c b/src/os/unix/ngx_sendv.c
new file mode 100644
index 000000000..bd95d7a7d
--- /dev/null
+++ b/src/os/unix/ngx_sendv.c
@@ -0,0 +1,14 @@
+
+#include <ngx_types.h>
+#include <ngx_sendv.h>
+
+ssize_t ngx_sendv(ngx_socket_t s, ngx_iovec_t *iovec, int n, size_t *sent)
+{
+ ssize_t rc = writev(s, iovec, n);
+
+ if (rc == -1)
+ return -1;
+
+ *sent = rc;
+ return 0;
+}