| * Copyright (C) Igor Sysoev |
| * Copyright (C) Nginx, Inc. |
| ngx_udp_unix_recv(ngx_connection_t *c, u_char *buf, size_t size) |
| n = recv(c->fd, buf, size, 0); |
| ngx_log_debug3(NGX_LOG_DEBUG_EVENT, c->log, 0, |
| "recv: fd:%d %z of %uz", c->fd, n, size); |
| if (ngx_event_flags & NGX_USE_KQUEUE_EVENT) { |
| * rev->available may be negative here because some additional |
| * bytes may be received between kevent() and recv() |
| if (rev->available <= 0) { |
| if (err == NGX_EAGAIN || err == NGX_EINTR) { |
| ngx_log_debug0(NGX_LOG_DEBUG_EVENT, c->log, err, |
| n = ngx_connection_error(c, err, "recv() failed"); |
| } while (err == NGX_EINTR); |