I am writing an application that receives a high-volume of data in the form of multicast UDP packets. To ensure that missed data is low, we are required to listen to two streams for the same data. The IP/port combos are as follows:
that is, the IPs are different but the ports are the same. By comparing the timestamp associated with the data sent to us with the time we actually receive it, we noticed there are times there is a significant time lag (on the order of several or more seconds). Another problem that has come up is that sometimes one of the streams comes in right away while the second stream may be delayed for several or more seconds as well.
Has any one encountered or heard of these problems before? If so, do you know how they may be resolved? Any and all help is appreciated.
The program is being developed in C using Micrsoft Visual Studio 2008.
>By comparing the timestamp associated with the data sent to us Where did you get this timestamp from?
Is the traffic a UDP multicast? Or are you making the same source send out two identical streams? If latter than the streams may not originate at the same time.
If data is sent form two different sources, how do you ensure that it gets sent at the same time? Also, how do you determine what time a datagram was sent?
I am not involved with the data sending. However, each datagram sent contains with its data the time it is sent in Coordinated Universal Time. I compare this time with the time I received the data.
The lag slowly increases the longer we receive the data - which I believe is do to the sync issue you raised. Any ideas about the second issue - where one stream comes in right away while the second may come in a little while later? Is this a network issue or could this be caused by my code?