MSI Factory 2.3

HTTP.GetConnectionState

HTTP.GetConnectionState

This is the first topic This is the last topic  

HTTP.GetConnectionState

This is the first topic This is the last topic  

OverviewExamples

table HTTP.GetConnectionState (

)

Example 1

tConnectedState = HTTP.GetConnectionState();

Gets the connection state, and store it in table 'tConnectedState'.

Example 2

-- Used to generate 100 spaces. This allows lining up of boolean values later

function AddSpaces()

   strReturn = ""

   for nCount = 1, 100 do

       strReturn = strReturn .. " ";

   end

   return strReturn;

end

 

 

-- converts boolean value to string (true = True, false = False)

function BoolToString(Value)

   if type (Value) == "boolean" then

       if Value then return "True" else return "False" end;

   else

       return Value;

   end

end

 

 

-- Get the current connection state

tConnectionState = HTTP.GetConnectionState();

 

-- Initialize string used to store the broken-down details

strStateDetails = "";

 

-- traverse through tConnectionState, fill in string strStateDetails

for sIndex, vDetails in tConnectionState do

   strStateDetails = strStateDetails .. String.Mid(sIndex..": ".. AddSpaces(),1, 30).. " " .. BoolToString(vDetails) .. "\r\n";

end

 

-- Output to user

Dialog.Message("Connection State Results", strStateDetails);

Tests the connection state and outputs the results to the user.

See also: Related Actions


Learn More: Indigo Rose Software - MSI Factory - Buy Now - Contact Us