Reliable UDP is impelemented much like how TCP is implemented. With each packet you have assign it an id. That id tells you its sequence with respect to the stream, and acts as a unique identifier if it gets dropped.
On the reciver side you recive these packets. After a set wait period (calculated based upon latency and other factors) you send the sender the packet ids which you have recived. You can''t send the packets you haven''t recived becuase you dont know if either there weren''t any packets sent or they all got dropped, so you send the ones which you have recived. Of course its possible this ack packet could be loss, if so then on the senders side, a complete resend will occur. So assuming the ack is not lost, the sender recived the list of sent packets. It then sends packets which were loss. That''s the gist of it.
If you use this reliable UDP stream with respect to packet boundaries, you can ignore the stream consistency and use the packets as they arrive. It will give you lower transcational latency with respect to packet loss. If not then you will suffer the same behavior which TCP streams have when there is loss, high latency. That is if you want to use the reliable UDP like a data stream, the sequenece must be complete before you can send it to the application. That means waiting on packet resends. If that is the case, might as well go with TCP. However if you know that the packets are independent of each other, and can be processed as they come in, you don''t need to wait on resends.
Good Luck
the main difference between UDP and TCP is that UDP is not a reliable protocol.
It is possible for an application to enjoy reliable data transfer over UDP. UDP uses checksum to learn whether data reached is true or not. You can also ensure reliability by creating a private protocol built on UDP.
UDP is alot faster than TCP. So if its realtime obviously it has to be fast, thus UDP. The only problem is UDP isn't as reliable or as secure as TCP. But it does have the speed advantage.
No TCP a reliable protocol whereas UDP is unreliable.
An important difference is that TCP includes mechanisms for reliable data communication (lost parts of the communication are re-sent), UDP doesn't. TCP is used when such a reliable communication is important. When speed is more important than reliability, UDP is used instead. This is the case with phone or video communication over the Internet.An important difference is that TCP includes mechanisms for reliable data communication (lost parts of the communication are re-sent), UDP doesn't. TCP is used when such a reliable communication is important. When speed is more important than reliability, UDP is used instead. This is the case with phone or video communication over the Internet.An important difference is that TCP includes mechanisms for reliable data communication (lost parts of the communication are re-sent), UDP doesn't. TCP is used when such a reliable communication is important. When speed is more important than reliability, UDP is used instead. This is the case with phone or video communication over the Internet.An important difference is that TCP includes mechanisms for reliable data communication (lost parts of the communication are re-sent), UDP doesn't. TCP is used when such a reliable communication is important. When speed is more important than reliability, UDP is used instead. This is the case with phone or video communication over the Internet.
You can use either TCP or UDP. If you need reliable connection use TCP otherwise UDP.
IP (Internet Protocol) is considered more reliable than UDP (User Datagram Protocol) because it is responsible for delivering packets across networks using error-checking and routing mechanisms. However, it's important to note that IP itself does not guarantee delivery, order, or error correction; it only manages addressing and forwarding. UDP, on the other hand, is a connectionless protocol that does not provide reliability features such as retransmission of lost packets or acknowledgment of receipt, making it less reliable than IP. In summary, while neither is fully reliable, IP has more mechanisms in place to enhance data delivery compared to UDP.
In general, yes, using UDP transport will use a smaller packet than TCP. UDP generally assumes that the complete message will fit within a single packet, unlike TCP which will segment or break apart a message into multiple packets for guaranteed reliable delivery. UDP has no such requirement to deliver anything within a reliable framework and would like to keep the entire message within a single packet and eliminate the segmentation and reassembly process.
When IP sends a packet, it receives a confirmation for each packet and, if needed, rebroadcast the packet. This makes it reliable. UDP does not get confirmation. It broadcast each packet only once and assumes that it get to you. This makes it less reliable then IP because it does not check for problems or rebroadcast.
Because TCP does far more things than UDP. UDP does not do flow control or congestion control or guarantee in-order and reliable packet delivery. TCP does all those things therefore it needs more functionality.
to make the network more faster.
UDP