Hi,

libuv 1.35.0 uses uv__udp_recvmmsg() internally if the buffer given
within uv_udp_recv_cb has length >= 2 * UV__UDP_DGRAM_MAXSIZE. If so,
uv_udp_recv_cb is called with UV_UDP_MMSG_CHUNK flag enabled.

By looking at the code I see:

#if HAVE_MMSG
  uv_once(&once, uv__udp_mmsg_init);
  if (uv__recvmmsg_avail) {
    /* Returned space for more than 1 datagram, use it to receive
    * multiple datagrams. */
    if (buf.len >= 2 * UV__UDP_DGRAM_MAXSIZE) {
      nread = uv__udp_recvmmsg(handle, &buf);
      if (nread > 0)
        count -= nread;
      continue;
    }
  }
#endif

I just want to be sure that the buffer and nread given in
uv_udp_recv_cb will just point to a **single** received UDP datagram
(as always). I assume this is true, otherwise it would be a super
breaking change since the application should do parsing to separate
different messages received into two separate UDP datagrams.

Can someone confirm that this is has no changed so there is nothing to
worry about?

Thanks.

-- 
Iñaki Baz Castillo
<i...@aliax.net>

-- 
You received this message because you are subscribed to the Google Groups 
"libuv" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to libuv+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/libuv/CALiegfnGtbLba3F8V_t9gFtGrfqHdK546F5RtoJHktkAouoG8Q%40mail.gmail.com.

Reply via email to