Skip to content

Conversation

@hsqStephenZhang
Copy link

@hsqStephenZhang hsqStephenZhang commented Jan 25, 2025

background

in these #352 #102 issues, someone mentioned that the performance is pretty low at the master branch, i encountered the same situation at my desktop and vps, so i checked out the previous commits and located the root cause.

root cause

from commit 5a49e83, the hand-written udp socket was changed to socket2. but in peer.rs, the udp socket's creation method's argument was wrong.

fix

Changed the socket type from Type::STREAM to Type::DGRAM to correctly handle UDP connections.

tests

i have tested several commits's performance with iperf3. after the fix, the throughput was finally ok

@hsqStephenZhang hsqStephenZhang changed the title fix: fix udp socket create error fix: fix udp socket creation argument error Feb 5, 2025
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