tfDnsSetOption

Jump to: navigation, search

Table of Contents >> Application Reference >> DNS Resolver


#include <trsocket.h>


int tfDnsSetOption (
int optionType,
int optionValue
);


Function Description

This function sets various DNS options outlined here:


Option Type Description
TM_DNS_OPTION_RETRIES Maximum number of times of retransmit a DNS request. Default value 3.
TM_DNS_OPTION_CACHE_SIZE Maximum number of entries in the DNS cache. Must be greater than zero. Default value 10.
TM_DNS_OPTION_TIMEOUT Amount of time (in seconds) to wait before retransmitting a DNS request. Value used, if we have one server. Default value 5 seconds.
TM_DNS_OPTION_MIN_TIMEOUT Amount of time (in seconds) to wait before retransmitting a DNS request. Value used instead of the previous one, if we have multiple servers. Default value 4 seconds.
TM_DNS_OPTION_MAX_SOCKETS_ALLOWED Maximum number of simultaneous DNS requests. Default value 1.


Parameters

  • optionType
    The option to set.
  • optionValue
    The value to set the option to.


Returns

  • TM_EINVAL
    The optionValue was invalid.
  • TM_ENOPROTOOPT
    The optionType was invalid.
  • TM_ENOERROR
    Success.


Table of Contents >> Application Reference >> DNS Resolver