nginx/src/os/unix/ngx_sendv.c

19 lines
307 B
C
Raw Normal View History

2002-09-02 22:48:24 +08:00
#include <ngx_core.h>
#include <ngx_types.h>
2002-08-20 22:48:28 +08:00
#include <ngx_socket.h>
#include <ngx_sendv.h>
ssize_t ngx_sendv(ngx_socket_t s, ngx_iovec_t *iovec, int n, size_t *sent)
{
2002-09-02 22:48:24 +08:00
ssize_t rc;
rc = writev(s, iovec, n);
if (rc == -1)
2002-09-02 22:48:24 +08:00
return NGX_ERROR;
*sent = rc;
2002-09-02 22:48:24 +08:00
return NGX_OK;
}