tfPingClose

Jump to: navigation, search

Table of Contents >> Application Reference >> PING API


#include <trsocket.h>


int tfPingClose (int socketDescriptor);


Function Description

This function stops the sending of any PING echo requests and closes the ICMP socket that had been opened via tfPingOpenStart().


Parameters

  • socketDescriptor
    An ICMP PING socket descriptor as returned by tfPingOpenStart().


Returns

  • > 0
    New socket descriptor.
  • 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
    The socket descriptor is invalid.


Table of Contents >> Application Reference >> PING API