4 ms·
> UDP (guaranteed delivery on localhost) That's not something I've heard before. Is it generally true of localhost-UDP? OS Specific? Particular to your usage?
by moreati 15y ago
> UDP (guaranteed delivery on localhost)
That's not something I've heard before. Is it generally true of localhost-UDP? OS Specific? Particular to your usage?
- rarrrrrr 15y agoI've tried to find where I originally read that. IIRC, it's a particularity of the Linux implementation, and of course only applies in the case that there's actually a process listening. I'll keep looking and post back if I run across a proper reference.
- eis 15y agoI doubt non-blocking anything has guaranteed delivery on localhost if you don't account for full buffers. As long as there is a buffer, sure, why would UDP lose packets on localhost? In order to not block your program, you'll have to do it like one always has with non-blocking sockets: have a buffer and poll for the "write-able" event. Unix sockets would involve less overhead and provide more security if you only send to localhost. I really don't see a reason to use UDP on localhost at least if you are not running on Windows.