tfMdnsExecute

Jump to: navigation, search

Table of Contents >> Application Reference >> Multicast_DNS_(mDNS)


#include <trsocket.h>


int tfMdnsExecute (ttMdnsServerPtr mdPtr);


Function Description

This is the workhorse of the mDNS server. Make sure you call this function in one context, only. For example, a dedicated mDNS server task.

All socket I/O and timer servicing is done in this call. Treck socket and timer events that occur in other contexts will set a flag in the socket or timer descriptors, which will be examined in a subsequent call to tfMdnsExecute().

All synchronous mDNS events are signalled by this function via the user's callback function (see tfMdnsStart()).


Warning Warning: Do not call tfMdnsExecute() from your mDNS callback function (see tfMdnsStart). Doing so is not supported and will produce unpredictable results.

This function must be called from one thread, only. The mDNS descriptor does not use mutual exclusion protection, by design, and is susceptible to data corruption if tfMdnsExecute() is called from more than one thread.



Parameters

  • mdPtr
    The mDNS server handle returned by a previous tfMdnsStart() call.


Returns

  • TM_ENOERROR
    The mDNS server is scheduled for shutdown and deletion; you must continue to call tfMdnsExecute() until it returns TM_ESHUTDOWN.
  • TM_EINVAL
    The mDNS server handle is invalid (no such entry in the global list of mDNS servers).


Table of Contents >> Application Reference >> Multicast_DNS_(mDNS)