Patent ID: 7469296

Claim:
A method of performing a bulk read, comprising: creating a socket structure for a socket associated with a logical port, wherein the socket structure contains a socket receive buffer; initiating, by an application associated with the logical port, a bulk read function having a bulk read size, wherein the bulk read size is a size identified by the application associated with the logical port; storing the bulk read size in a field in the socket structure; checking a state of a flag in the socket structure, where the flag is used to conditionally invoke a function upon receipt of a data packet; determining if an amount of data in the socket receive buffer is equal to or greater than the bulk read size if the flag is set; in response to setting of the flag in the socket structure, activating the bulk read function only when there is an amount of data in the socket receive buffer equal to or greater than the bulk read size, wherein if the amount of data stored in the socket receive buffer is less than the bulk read size, the bulk read function is not activated; and receiving a Transport Control Protocol (TCP) segment for the socket from a sending device, wherein the steps of checking the state of the flag in the socket structure and determining if an amount of data in the socket receive buffer is less than the bulk read size are performed in response to receiving the TCP segment.