DNSBeginUsage Function

Microchip TCP/IP Stack

Microchip TCP/IP Stack Help
DNSBeginUsage Function
C
BOOL DNSBeginUsage();
Description

This function acts as a semaphore to obtain usage of the DNS module. Call this function and ensure that it returns TRUE before calling any other DNS APIs. Call DNSEndUsage when this application no longer needs the DNS module so that other applications may make use of it.

Preconditions

Stack is initialized.

Return Values
Return Values 
Description 
TRUE 
No other DNS resolutions are in progress and the calling application has sucessfully taken ownership of the DNS module 
FALSE 
The DNS module is currently in use. Yield to the stack and attempt this call again later. 
Remarks

Ensure that DNSEndUsage is always called once your application has obtained control of the DNS module. If this is not done, the stack will hang for all future applications requiring DNS access.

Microchip TCP/IP Stack 5.42.08 - June 15, 2013
Copyright © 2012 Microchip Technology, Inc.  All rights reserved.