[asterisk-dev] socket_read: Packet arrived out of order (expecting2, got 1)

Tim Ringenbach tim.ringenbach at gmail.com
Wed Mar 8 20:30:41 MST 2006


On 3/8/06, Rich Adamson <radamson at routers.com> wrote:
>
> > IAX2 is carried on UDP packets and they, by definition, are not required
> > to arrive in order of transmission (or even arrive at at all) at the
> > application layer. This differs from TCP packets, who are required to be
> > presented to the application in order and with no gaps. It follows
> > therefore that queueing and congestion on a larger network such as the
> > Internet may cause the IAX frames to go astray.
>
> Correction... there is no requirement that tcp packets arrive in order
> either. The tcp packets do have the information neessary for the IP stack
> to put the packets back in order, and do a retransmission request for
> any missing packets, but that's it.
>
> In general terms, both udp and tcp packets are subjected to the exact
> same out-of-order issues in any network, including the Internet.
>
>

I think you missed the "application layer" part. By the time the application
sees the data in TCP, it's a stream instead of packets, and in order. You
could implement the same thing on top of UDP, although you probably don't
want things like retransmission for voip.


--Tim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-dev/attachments/20060308/a682e01b/attachment.htm


More information about the asterisk-dev mailing list