Skip to content

Commit

Permalink
unix: refactor udp sendmsg code
Browse files Browse the repository at this point in the history
Shuffle around and DRY the sendmsg logic in preparation for
uv_udp_try_send2(). NFC barring bugs.

This work was sponsored by ISC, the Internet Systems Consortium.
  • Loading branch information
bnoordhuis committed Dec 13, 2024
1 parent acebb97 commit 7b4cf04
Show file tree
Hide file tree
Showing 2 changed files with 188 additions and 186 deletions.
5 changes: 4 additions & 1 deletion include/uv/unix.h
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,10 @@ typedef struct {

#define UV_UDP_SEND_PRIVATE_FIELDS \
struct uv__queue queue; \
struct sockaddr_storage addr; \
union { \
struct sockaddr addr; \
struct sockaddr_storage storage; \
} u; \
unsigned int nbufs; \
uv_buf_t* bufs; \
ssize_t status; \
Expand Down
Loading

0 comments on commit 7b4cf04

Please sign in to comment.