Home |
Sockets, IP, and Port Addresses Blocking and Non-Blocking Sockets TCP No Copy |
TCP No CopyEach TCP window operates in two modes; no copy and copy, as set by the socket option SO_TCP_NO_COPY using function setsockopt. In no copy mode, the DCUs are added to the window without doing any copies, i.e. if two input packets arrive with packet sizes 100 and 110, two DCUs will be added to the input window. In copy mode, the data will be copied to fill up the DCU at the end of the list, i.e. in the above example the data from the second packet will be copied to the end of the first DCU; therefore, the input window will contain one DCU with data size 210. The data area in the DCUs is fixed (see CFG_MAX_PACKETSIZE). Data is always copied to/from the appropriate window to the buffer supplied by the application.
|