Open theicfire opened 5 years ago
While error reporting is certainly a good idea, I'm not sure how best to handle this in practice. These calls are in a loop, as several destinations are traversed.
I'm curious, did you encounter a problem with sendto in practice?
I didn't see them show up in practice, no. I think I was looking through the code when tracking down another issue (receive buffer sizes, which you allow to change, thanks!)
Frankly even a TODO comment on the sendto
commands mentioning that the errors are being ignored would be a step in the right direction. If someone's tracking down a sendto issue, they could just print out errors themselves, like I ended up doing.
In
RTPUDPv4Transmitter::SendRTPData
, I notice that the return value ofsendto
is simply ignored. There's a variety of issues that may show up with the call. At the very least, it would be good to check thatsendto
was successful, by checking that the return value is the same as the length of bytes written. If it's not successful, some sort of error should show up, even it's as simple as "sendto failed".