Navigation:  »No topics above this level«

TLuaDNS

Previous pageReturn to chapter overviewNext page

The class provides functions for querying DNS servers.

Example

----------------------------------------------------------------------------------------------------------

-- INM Lua API example (C) 2008 Intellipool AB

-- Demonstrates the Lua DNS interface

----------------------------------------------------------------------------------------------------------

DNS = TLuaDNS();

DNS:Begin(true);

 

if DNS:Query("microsoft.com",TLuaDNS.LuaDNS_TYPE_MX,false) then

 

 Record = TLuaDNS_MXRecord();

 

 while (DNS:Next(Record)) do

         print(Record.m_sNameExchange);

 end

 

 SetExitStatus("Test ok",true);

 

else

 SetExitStatus("Test failed",false);

end