Patent ID: 7876677

Claim:
An apparatus that queues and transmits data packets, comprising: a queue configured to store data packets awaiting transmission; a controller configured to dynamically determine an order in which the data packets are transmitted from the queue using Transmission Control Protocol (TCP) sequence numbers and/or TCP timestamps contained in the data packets in the queue, wherein while removing a data packet from the head of the queue in preparation for transmission, the controller is further configured to ensure that the packets are transmitted in the determined order by: searching the queue for the data packet with an earliest sequence number belonging to a same TCP connection as the data packet at the head of the queue; determining that the data packet with an earliest sequence number is not the data packet currently at the head of the queue; and swapping the data packet at the head of the queue with the earliest data packet, wherein swapping the data packets involves modifying a preference value associated with the packets to cause the earliest data packet to be processed before any other data packets for the same TCP connection; and a transmission mechanism configured to transmit the data packets from the queue in the determined order.