DETERMINING ON DEMAND RIGHT SIZE BUFFERING WITHIN A SOCKET SERVER IMPLEMENTATION
First Claim
Patent Images
1. A computer readable storage medium containing a program which, when executed by a computer, performs operations for processing messages, the operations comprising:
- processing an input operation issued from a sockets server application to a sockets layer of the computer, wherein the input operation is configured with a buffer mode parameter indicating to the sockets layer a buffer acquisition method for acquiring a buffer for containing data received from a remote source via a network connection;
receiving the data from the remote source via the network connection;
subsequently, obtaining the buffer according to the buffer acquisition method, wherein the obtained buffer is sized exactly to the size of the data received from the remote source; and
allocating the obtained buffer, wherein allocating the obtained buffer is dependent on a value of the buffer mode parameter and comprises one of;
allocating the buffer from an application-supplied storage owned by the sockets server application when the buffer mode parameter has a first value; and
allocating the buffer from a system-supplied storage not owned by the sockets server application when the buffer mode parameter has a second value.
0 Assignments
0 Petitions
Accused Products
Abstract
Method, apparatus and article of manufacture for acquiring a buffer after data from a remote sender (e.g., client) has been received by a local machine (e.g., server). Because the client data has already been received when the buffer is acquired, the buffer may be sized exactly to the size of the client data. In general, the buffer may be caller supplied or system supplied.
-
Citations
16 Claims
-
1. A computer readable storage medium containing a program which, when executed by a computer, performs operations for processing messages, the operations comprising:
-
processing an input operation issued from a sockets server application to a sockets layer of the computer, wherein the input operation is configured with a buffer mode parameter indicating to the sockets layer a buffer acquisition method for acquiring a buffer for containing data received from a remote source via a network connection; receiving the data from the remote source via the network connection; subsequently, obtaining the buffer according to the buffer acquisition method, wherein the obtained buffer is sized exactly to the size of the data received from the remote source; and allocating the obtained buffer, wherein allocating the obtained buffer is dependent on a value of the buffer mode parameter and comprises one of; allocating the buffer from an application-supplied storage owned by the sockets server application when the buffer mode parameter has a first value; and allocating the buffer from a system-supplied storage not owned by the sockets server application when the buffer mode parameter has a second value. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9)
-
-
10. A system in a distributed environment, comprising:
-
a network interface configured to support a network connection with at least one other computer in the distributed environment; a memory comprising a sockets server application, a socket in communication with the sockets server application and a protocol stack in communication with the socket, wherein the protocol stack is configured to transport messages between the network interface and the socket; a processor configured to perform operations for processing messages, the operations comprising; processing an input operation issued from the sockets server application to the socket, wherein the input operation is configured with a buffer mode parameter indicating to the socket a buffer acquisition method for acquiring a buffer for containing data received from the at least one other computer; and receiving the data; subsequently, obtaining the buffer according to the buffer acquisition method, wherein the obtained buffer is sized exactly to the size of the data received from the remote source; and allocating the obtained buffer; and an application-supplied storage owned by the sockets server application and a system-supplied storage not owned by the sockets server application, and wherein allocating the obtained buffer is dependent on a value of the buffer mode parameter and comprises one of; allocating the buffer from the application-supplied storage when the buffer mode parameter has a first value; and allocating the buffer from the system-supplied storage when the buffer mode parameter has a second value. - View Dependent Claims (11, 12, 13, 14, 15, 16)
-
Specification