Skip to content

refactor udx_socket_send_ttl (needs fast-path-for-stream-write)#278

Open
jthomas43 wants to merge 1 commit intoholepunchto:mainfrom
jthomas43:simplify-send-ttl
Open

refactor udx_socket_send_ttl (needs fast-path-for-stream-write)#278
jthomas43 wants to merge 1 commit intoholepunchto:mainfrom
jthomas43:simplify-send-ttl

Conversation

@jthomas43
Copy link
Copy Markdown
Contributor

This PR simplifies the udx_socket_send_ttl, when uv_udp_try_send() fails, instead of scheduling the packet with uv_udp_send() it sets a timer and tries again with uv_udp_try_send() again until it succeeds. This lets us remove the code that tracks where packets that need a specific TTL are in the uv_udp send queue, and the code that peeks the next packet to determine if adjusting the TTL is necessary.

This PR only makes sense if the fast-path for stream write (#277 ) is merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant