I used to use UDP. Its nice for some things.
Things I liked:
When you read a UDP message you got the whole message or nothing (its not a stream).
Fast.
Multicast!
Things that challenged us:
64K message size limit (varied slightly from linux/solaris/hpux)
you can't tell if the other side is listening or got the message.
multicast requires use of certain ip ranges which people seem to forget frequently.
I had the UNIX Network Programming by W. Richard Stevens tome I borrowed from my boss. Good for networking.
Yeah you have to recapitulate some TCP semantics to use UDP effectively. Packet numbering (so you can catch out-of-order packets). Dice-and-reassemble. Congestion control.
But the good news is, you CAN do those things yourself. And avoid the TCP lockups, slowdowns and endless retransmissions.
as an aside, its generally a mistake to use IP-Size > PMTU (commonly ~1500).. the result is IP fragmentation and IP stacks commonly have very limited resources devoted to IP reassembly (otherwise its a DoS attack) - so its very easy for your fragmented UDP message to get "lost" even when the network transport does not have an error.
When it seems to work ok its basically because your app is the only one doing it.. if it were common practice you would all fight for the same reassembly buffer space and the OS would have to start dropping things. Your application also becomes trivially dosable at low bandwidths by an attacker intentionally using up the reassembly buffer.
Things that challenged us: 64K message size limit (varied slightly from linux/solaris/hpux) you can't tell if the other side is listening or got the message. multicast requires use of certain ip ranges which people seem to forget frequently.
I had the UNIX Network Programming by W. Richard Stevens tome I borrowed from my boss. Good for networking.