The Parable of the Perfect Connection
blogs.janestreet.com
blogs.janestreet.com
To my fellow novice programmers, I recommend reading Joel Spolsky's great post called 'leaky abstractions', written in 2002.
It's just considerate to other human beings to let them know (using a suitable means) that an API call has failed (for whatever reason) and quickly. Opaque loop-and-retry-until-we-succeed makes problem diagnosis stupidly difficult. Anything that makes the audience programmer's feedback cycle slower and impedes problem diagnosis is both counter-productive and irritating. Simply communicating "I CAN FAIL AND HERE IS WHY..." is a Really Good Thing.
In my experience (read this with an 'anecdote' filter turned on) teams that communicate everything to the point of superfluity generally work better. This extends to your code, particularly APIs.
One mistake though: TCP sits on top of IP, not UDP.