TCP protocol insures that your data was delivered in reliable and rapid way.
Guaranteed reliable delivery is provided by TCP transport.
UDP as a transport protocol is used in situations where speed is more important than reliability in the delivery of the packets. Therefore, any application that requires speed as its primary delivery could use UDP. This type of delivery is not checked for consistency or reliability, so you wouldn't use it if the delivery has to be reliable.
transport layer
UDP
UDP
A reliable protocol is one that ensures reliability properties with respect to the delivery of data to the intended recipients
**The TCP transport layer protocol uses windowing and acknowledgments for reliable transfer of data. **The TCP and UDP port numbers are used by application layer protocols. **The TCP transport layer protocol provides services to direct the data packets to their destination hosts.
It appears as though you have the two concepts reversed; if you are using flow control than you are using a reliable delivery method - these are at layer 4 of the OSI model, which is TCP for reliable delivery. TCP provides flow control. UDP would be used for speed, when you do not need reliable delivery. However, UDP does not use flow control, since there is no handshaking between transmission and reception, and it is a connectionless protocol.
Reliable delivery
Transport layer is responsible for reliable delivery of information, error correction and so on.
Take a look at any definition for TCP protocol. Most are also written in C.
The Transport layer which handles segments is responsible for End-to-End connections and reliability. Problems at this layer can negatively impact reliable message delivery. Although the Transport layer is supposed to be where reliability is provided, problems at the Network layer where packets are handled can also significantly affect reliable message delivery if the path determination and/or IP (logical addressing) are messed up.