tfDnsUpdateSetCallback
Table of Contents >> Application Reference >> Dynamic DNS Update
| #include <trsocket.h> |
| int tfDnsUpdateSetCallback | ( |
| ttDnsUpdateHandle dnsUpdateHandle, | |
| ttUserDnsUpdateCBFuncPtr userDnsUpdateFuncPtr, | |
| void * userDnsUpdateDataPtr | |
| ); |
Function Description
Set a pointer to a function that you provide for the purpose of event notification. This is only useful if you are using DNS in non-blocking mode (see tfDnsInit()). The callback function API is discussed on the ttUserDnsUpdateCBFuncPtr page.This call is optional for non-blocking applications. By receiving notification of socket and timer events, you know exactly when you need to call tfDnsUpdateExecute().
Parameters
- dnsUpdateHandle
- A DNS update descriptor handle returned by tfDnsUpdateOpen().
- userDnsUpdateFuncPtr
- A pointer to a function that you provide of type ttUserDnsUpdateCBFuncPtr. This parameter can be NULL to remove a previously set value.
- userDnsUpdateDataPtr
- A pointer that will be passed as a parameter to userDnsUpdateFuncPtr. Treck does not use this pointer except to pass it to your callback function. Note: Pointers to local stack variables may go out of scope and become invalid by the time your callback function is called.
Returns
- TM_ENOERROR
- Success.
- TM_EINVAL
- Invalid descriptor handle.
- TM_EPERM
- Cannot change the descriptor while tfDnsUpdateSend() is in progress.
Table of Contents >> Application Reference >> Dynamic DNS Update