<doc>
  <legacy_id>1427</legacy_id>
  <name>resetAll</name>
  <type>command</type>
  <syntax>
    <example>resetAll</example>
  </syntax>
  <library>Internet library</library>
  <objects>
  </objects>
  <synonyms>
    <synonym>libURLResetAll</synonym>
  </synonyms>
  <classification>
    <category>Networks &amp; Communication</category>
    <category>Standalone Applications</category>
  </classification>
  <references>
    <command tag="close socket">close socket Command</command>
    <message tag="socketError">socketError Message</message>
  </references>
  <history>
    <introduced version="1.1">Added.</introduced>
  </history>
  <platforms>
    <mac/>
    <windows/>
    <linux/>
  </platforms>
  <classes>
    <desktop/>
    <server/>
    <web/>
  </classes>
  <security>
    <network/>
  </security>
  <summary>Closes all open <glossary tag="socket">sockets</glossary> and halts all pending Internet operations.</summary>
  <examples>
    <example>if the openSockets is not empty then resetAll</example>
  </examples>
  <description>
    <p>Use the <b>resetAll</b> <glossary tag="command">command</glossary> to troubleshoot Internet connection problems.</p><p/><p><b>Comments:</b></p><p>The <b>resetAll</b> <glossary tag="command">command</glossary> closes all open sockets, including any <glossary tag="socket">sockets</glossary> that have been opened by the <glossary tag="Internet library">Internet library</glossary>; clears all <glossary tag="variable">variables</glossary> used by the <glossary tag="Internet library">Internet library</glossary>; and clears all cached data.</p><p/><p>Since the Internet library's routines for handling <b>http</b> and <keyword tag="ftp">ftp</keyword> <glossary tag="upload">uploads</glossary> and <glossary tag="download">downloads</glossary> are <glossary tag="socket">socket</glossary>-based, the <b>resetAll</b> <glossary tag="command">command</glossary> resets all these operations.</p><p/><p><code/><img src="202650"/> <b>Caution!</b><code/> The <b>resetAll</b> <glossary tag="command">command</glossary> closes all open <glossary tag="socket">sockets</glossary>, which includes any other <glossary tag="socket">sockets</glossary> opened by your application and any <glossary tag="socket">sockets</glossary> in use for other <glossary tag="upload">uploads</glossary> and <glossary tag="download">downloads</glossary>. Because of this, you should avoid routine use of the <b>resetAll</b> <glossary tag="command">command</glossary>. Consider using it only during development, to clear up connection problems during <glossary tag="debug">debugging</glossary>.</p><p/><p><code/><img src="202653"/> <b>Important!</b><code/> The <b>resetAll</b> <glossary tag="command">command</glossary> is part of the <glossary tag="Internet library">Internet library</glossary>. To ensure that the <glossary tag="command">command</glossary> works in a <glossary tag="standalone application">standalone application</glossary>, you must include this <glossary tag="LiveCode custom library">custom library</glossary> when you create your <glossary tag="standalone application">standalone</glossary>. In the Inclusions section of the <glossary tag="Standalone Application Settings">Standalone Application Settings</glossary> window, make sure "Internet Library" is selected in the list of script libraries.</p><p/><p><code/><b>Note:</b><code/> When included in a <glossary tag="standalone application">standalone application</glossary>, the <glossary tag="Internet library">Internet library</glossary> is implemented as a hidden <command tag="group">group</command> and made available when the <command tag="group">group</command> receives its first <message tag="openBackground">openBackground</message> message. During the first part of the <glossary tag="application">application's</glossary> startup process, before this <keyword tag="message box">message</keyword> is sent, the <b>resetAll</b> <glossary tag="command">command</glossary> is not yet available. This may affect attempts to use this <glossary tag="command">command</glossary> in <message tag="startup">startup</message>, <message tag="preOpenStack">preOpenStack</message>, <message tag="openStack">openStack</message>, or <message tag="preOpenCard">preOpenCard</message> <glossary tag="handler">handlers</glossary> in the <glossary tag="main stack">main stack</glossary>. Once the <glossary tag="application">application</glossary> has finished starting up, the <command tag="start using">library</command> is available and the <b>resetAll</b> <glossary tag="command">command</glossary> can be used in any <glossary tag="handler">handler</glossary>.</p>
  </description>
</doc>