A method and device for transmitting data between a protocol stack and an application program
An application program and data transmission technology, applied in the network field, to achieve the effect of avoiding copying, avoiding memory copying, and avoiding memory copying operations
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0052] Embodiment 1. A method for transmitting data between a protocol stack and an application program, comprising:
[0053] S101. Receive the first data in the form of a singly linked list sent to the protocol stack by the application program;
[0054] S102. Map each data block in the first data to the TCP segment in sequence according to the order of the singly linked list, and the length of the data block mapped in a TCP segment is less than or equal to a predetermined length; the mapping means to represent the The information of the start and end positions of the data block in the sending data buffer is written into the TCP segment; the mapped TCP segments are sequentially added to the sending queue.
[0055] In this embodiment, the first data is stored in the form of a singly linked list, each node in the singly linked list can be regarded as a data block in the first data, each node includes an area for storing data, And a pointer to indicate the starting address of th...
Embodiment 2
[0108] Embodiment 2, a device for transmitting data between a protocol stack and an application program, comprising:
[0109] The sending data interface module is used to receive the first data in the form of a singly linked list sent by the application program to the protocol stack;
[0110] The mapping module is used to sequentially map each data block in the first data to the TCP segment according to the order of the singly linked list, and the length of the data block mapped in a TCP segment is less than or equal to a predetermined length; the mapping refers to the The information indicating the start and end positions of the data block in the sending data buffer is written into the TCP segment; and the mapped TCP segments are sequentially added to the sending queue.
[0111] In an implementation manner of this embodiment, the mapping module may specifically include:
[0112] mapping control unit, mapping execution unit, sending control unit;
[0113] The mapping control...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


