tfCheckSentInterface

Jump to: navigation, search

Table of Contents >> Programmer's Reference


#include <trsocket.h>


int tfCheckSentInterface (ttUserInterface interfaceHandle);


Function Description

This function is used in conjunction with tfNotifyInterfaceIsr() and tfSendCompleteInterface(), to poll the device driver to see if the packet sent to the device driver has been sent. This function will return 0, when the accumulated numberBytesSent notified by tfNotifyInterfaceIsr() has reached TM_NOTIFY_SEND_LOW_WATER (2048 by default). When tfCheckSentInterface() returns 0, the caller should then call tfSendCompleteInterface() to allow the stack to free the zero copy buffers used by the protocol stack. This call is used when the user does not have a separate send complete task or thread.


Parameters

  • interfaceHandle
    The interface handle to check to see if data has been sent.


Returns

  • TM_ENOERROR
    Send Complete has occurred (the driver has called tfNotifyInterfaceIsr() from the send complete interrupt service routine, and the TM_NOTIFY_SEND_LOW_WATER mark has been reached).
  • TM_EWOULDBLOCK
    No data has been sent yet or the threshold has not been reached.


Table of Contents >> Programmer's Reference