A system for buffering data received from a network comprises a network
socket, a plurality of buffers, a buffer pointer pool, receive logic, and
packet delivery logic. The buffer pointer pool has a plurality of entries
respectively pointing to the buffers. The receive logic is configured to
pull an entry from the pool and to perform a bulk read of the network
socket. The entry points to one of the buffers, and the receive logic is
further configured to store data from the bulk read to the one buffer
based on the entry. The packet delivery logic is configured to read,
based on the entry, the one buffer and to locate a missing packet
sequence in response to a determination, by the packet delivery logic,
that the one buffer is storing an incomplete packet sequence. The packet
delivery logic is further configured to form a complete packet sequence
based on the incomplete packet sequence and the missing packet sequence.