tfGetSendBytesLeft

Jump to: navigation, search

Table of Contents >> Programmer's Reference


#include <trsocket.h>


int tfGetSendBytesLeft (int socketDescriptor);


Function Description

This function is used to retrieve the number of bytes left to be written in a socket's send queue.


Parameters

  • socketDescriptor
    The socket descriptor that corresponds to the send queue of interest.


Returns

  • >= 0
    The number of bytes waiting to be written in the socket's send queue.
  • TM_SOCKET_ERROR
    Failure.


Note Note: TM_SOCKET_ERROR means that this socket call has failed and the errorCode has been set on the socket itself.

To retrieve the socket error the user must call tfGetSocketError(socketDescriptor).


Possible socket errors

  • TM_EBADF
    'socketDescriptor' is not a valid descriptor.


Table of Contents >> Programmer's Reference