From
User Datagram Protocol[
^]):
UDP uses a simple transmission model without implicit hand-shaking dialogues for guaranteeing reliability, ordering, or data integrity. Thus,
UDP provides an unreliable service and
datagrams may arrive out of order, appear duplicated, or go missing without notice.
UDP assumes that error checking and correction is either not necessary or performed in the application, avoiding the overhead of such processing at the network interface level. Time-sensitive applications often use
UDP because dropping packets is preferable to waiting for delayed packets, which may not be an option in a real-time system. If error correction facilities are needed at the network interface level, an application may use the Transmission Control Protocol (TCP) or Stream Control Transmission Protocol (SCTP) which are designed for this purpose.
Be aware that
Windows systems usually are not able to ensure
I/O latencies smaller than some milliseconds, and 100 Hz has to be considered a sustained frequency for standard applications.
What to do is highly dependant on your requirements; you can:
- make your application fault tolerant: this is possible only if it is acceptable to loose some datagram
- change the transmission protocol, for instance to TCP/IP: this requires to implement a more complicated protocol on your micro, then it depends on its resources and on the platform that you use on it (see CMX Systems, Inc[^] for an example of TCP/IP implementation for 8, 16 and 32-bit micro)
- use real-time extensions for Windows, like Ardence RTX (see IntervalZero - RTX[^]): this way you are able to write Windows applications with strict timing behaviours, and probably you will be able to work with UDP packets without problems