uNetworking / uSockets

Miniscule cross-platform eventing, networking & crypto for async applications
Apache License 2.0
1.29k stars 267 forks source link

Error initializing structure msg_hdr by UDP, field msg_name #207

Open IvanShipaev opened 1 year ago

IvanShipaev commented 1 year ago

https://github.com/uNetworking/uSockets/blob/ac4e90e4d2ad674db903accc5f3abc408a6bc5d8/src/bsd.c#L254

Error initializing structure msg_hdr, here you need to fix &b->addr[n]. Otherwise, when reading multiple packets from the buffer, they will always have the same sender address, even if these packets were sent from two different addresses.