EvilZone
General Tech => Networking => : mpaganini September 23, 2015, 12:35:46 AM
-
hello folks, someone are using some version of the reliable UDP? Since currently there is no standard, as it was thought to make it happen and with what restrictions apply? :)
-
Generally if i need reliable UDP I just use TCP... but im sure someone will chime in here :p
-
UDP was never made to be reliable. If you want reliability, use TCP, reliability is built in.
That said, if you want to make your own bloated version of UDP that has reliability you may want to code some of the following features:
- Packet numbering / sequencing - UDP packets arrive out of order, so you can either hard code only sending the next packet when you receive an acknowledgement that it has arrived, or you can put a sequence number and have the receiver rebuild the packets.
- Delivery acknowledgement (ACK) - server sends an ACK that the message was received. Also remember that the server may send an ACK, but the client may not get it, so you could be stuck receiving a packet that you already have because the client doesn't get your message saying that you received it.
- Resend timeout - resend the packet if you didn't receive an ACK for it after a while, you'll obviously want to limit this otherwise your protocol would be vulnerable to being abused in a DDoS attack.
- Packet checksums - make sure the data integrity is kept, otherwise don't ACK the packet and wait for it to be sent again.
- Packet length prefixes - easier for the server to determine how much data you sent.
Easily said... just use TCP for reliability.
-
hello folks, someone are using some version of the reliable UDP? Since currently there is no standard, as it was thought to make it happen and with what restrictions apply? :)
There's a fairly old experimental standard:
https://tools.ietf.org/html/rfc908
https://tools.ietf.org/html/rfc1151
As well as a slightly more recent draft:
https://tools.ietf.org/html/draft-ietf-sigtran-reliable-udp-00
And there's Lossless UDP from the TOX project:
https://github.com/irungentoo/toxcore/wiki/Lossless-UDP
https://wiki.tox.im/index.php/Lossless_UDP
-
thanks for your answers.
Just for clarification, the entire subnet will be working with a reliable UDP: no derogation is possible.
Unfortunately "https://wiki.tox.im/index.php/Lossless_UDP" is offline.
:)
-
Reliable UDP is TCP... or you will do it on higher layer eitherway
-
The "TCP/IP" protocol is very difficult to be able to certify (guideline DO-178B).
Infact, the DO-178B, Software Considerations in Airborne Systems and Equipment Certification , is a guideline dealing with the safety of safety-critical software used in certain airborne systems.
For this reason it is preferred to use the UDP/IP, or the version R-UDP.
I found this interesting contribution
-
I'm suprised nobody mentioned QUIC (https://www.chromium.org/quic) (quick udp internet connections). It's part of the chromium project.
It's built on top of UDP but is more similar to TCP since it provides a reliable connection.
General info:
https://www.chromium.org/quic (https://www.chromium.org/quic)
You can test out a client/server:
https://www.chromium.org/quic/playing-with-quic (https://www.chromium.org/quic/playing-with-quic)
Some VPN clients have implemented the protocol, IPVanish for example.