tfGetZeroCopyBuffer

Jump to: navigation, search

Table of Contents >> Programmer's Reference


#include <trsocket.h>


ttUserMessage tfGetZeroCopyBuffer (
int size,
char * * dataPtrPtr
);


Function Description

This function is used to get a Zero Copy Buffer. This buffer can then be used with tfZeroCopySend() and tfZeroCopySendTo() for zero copy send functions. This is a TRUE zero copy if the device driver supports DMA sending.


Parameters

  • size
    The size of the buffer to be used for the zero copy.
  • dataPtrPtr
    Pointer to a pointer that is the beginning of the user's data area. This is where the user can store the data to be sent.


Returns

  • Valid (ttUserMessage) pointer
    Success.
  • (ttUserMessage)0
    Failure. Insufficient memory to complete the operation or (*dataPtrPtr) was invalid.


Table of Contents >> Programmer's Reference