Patent ID: 7581045

Claim:
A method, comprising: receiving a synchronous request for reading data, wherein the synchronous request requests a first number of bytes of data; sending an asynchronous request to fill selected buffers of a plurality of buffers, wherein the asynchronous request requests a second number of bytes of data, wherein the second number of bytes of data is greater than the first number of bytes of data, an d wherein a number of buffers used for prefetching data is increased if a generator of the synchronous request reads at a rate faster than a rate at which the plurality of buffers are filled; and responding to the synchronous request with the data from at least one buffer of the plurality of buffers, wherein the synchronous request is generated by a first application and the synchronous request is received by a second application from the first application, wherein the sending and the responding are performed by the second application, and wherein the method further comprises: generating, by the first application, the synchronous request for reading data; and waiting, by the first application, until the synchronous request is responded to by the second application, wherein the asynchronous request is sent by the second application to a network stack corresponding to a network adapter that receives a stream of data, and wherein the network stack: receives the asynchronous request from the second application; and initiates the filling of the selected buffers, wherein subsequent synchronous requests from the first application are responded to by the second application from an additional amount of data that has already been fetched.