2002-08-07 00:39:45 +08:00
|
|
|
|
2002-09-02 22:48:24 +08:00
|
|
|
#include <ngx_core.h>
|
2002-08-07 00:39:45 +08:00
|
|
|
#include <ngx_types.h>
|
2002-08-20 22:48:28 +08:00
|
|
|
#include <ngx_socket.h>
|
2002-08-07 00:39:45 +08:00
|
|
|
#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);
|
2002-08-07 00:39:45 +08:00
|
|
|
|
|
|
|
if (rc == -1)
|
2002-09-02 22:48:24 +08:00
|
|
|
return NGX_ERROR;
|
2002-08-07 00:39:45 +08:00
|
|
|
|
|
|
|
*sent = rc;
|
2002-09-02 22:48:24 +08:00
|
|
|
return NGX_OK;
|
2002-08-07 00:39:45 +08:00
|
|
|
}
|