Lines Matching defs:buf
61 static int uv__udp_recvmmsg(uv_udp_t* handle, uv_buf_t* buf);
187 static int uv__udp_recvmmsg(uv_udp_t* handle, uv_buf_t* buf) {
198 chunks = buf->len / UV__UDP_DGRAM_MAXSIZE;
202 iov[k].iov_base = buf->base + k * UV__UDP_DGRAM_MAXSIZE;
220 handle->recv_cb(handle, 0, buf, NULL, 0);
222 handle->recv_cb(handle, UV__ERR(errno), buf, NULL, 0);
240 handle->recv_cb(handle, 0, buf, NULL, UV_UDP_MMSG_FREE);
250 uv_buf_t buf;
263 buf = uv_buf_init(NULL, 0);
264 handle->alloc_cb((uv_handle_t*) handle, UV__UDP_DGRAM_MAXSIZE, &buf);
265 if (buf.base == NULL || buf.len == 0) {
266 handle->recv_cb(handle, UV_ENOBUFS, &buf, NULL, 0);
269 assert(buf.base != NULL);
273 nread = uv__udp_recvmmsg(handle, &buf);
284 h.msg_iov = (void*) &buf;
294 handle->recv_cb(handle, 0, &buf, NULL, 0);
296 handle->recv_cb(handle, UV__ERR(errno), &buf, NULL, 0);
303 handle->recv_cb(handle, nread, &buf, (const struct sockaddr*) &peer, flags);