Name: resetAll

Type: command

Syntax: resetAll

Summary: Closes all open <socket|sockets> and halts all pending Internet operations.

Synonyms: libURLResetAll

Introduced: 1.1

OS: mac,windows,linux

Platforms: desktop,server,web

Security: network

Example:
if the openSockets is not empty then resetAll

Description:
Use the <resetAll> <command> to troubleshoot Internet connection problems.

The <resetAll> <command> closes all open sockets, including any <socket|sockets> that have been opened by the <Internet library>; clears all <variable|variables> used by the <Internet library>; and clears all cached data.

Since the Internet library's routines for handling http and <ftp> <upload|uploads> and <download|downloads> are <socket> -based, the <resetAll> <command> resets all these operations.

>*Warning:*  The <resetAll> <command> closes all open <socket|sockets>, which includes any other <socket|sockets> opened by your application and any <socket|sockets> in use for other <upload|uploads> and <download|downloads>. Because of this, you should avoid routine use of the <resetAll> <command>. Consider using it only during development, to clear up connection problems during <debug|debugging>.

>*Important:*  The <resetAll> <command> is part of the <Internet library>. To ensure that the <command> works in a <standalone application>, you must include this <Revolution custom library|custom library> when you create your <standalone application|standalone>. In the Inclusions section of the <Standalone Application Settings> window, make sure "Internet Library" is selected in the list of script libraries.

>*Note:* When included in a <standalone application>, the <Internet library> is implemented as a hidden <group> and made available when the <group> receives its first <openBackground> message. During the first part of the <application|application's> startup process, before this <message> is sent, the <resetAll> <command> is not yet available. This may affect attempts to use this <command> in <startup>, <preOpenStack>, <openStack>, or <preOpenCard> <handler|handlers> in the <main stack>. Once the <application> has finished starting up, the <library> is available and the <resetAll> <command> can be used in any <handler>.

References: ftp (keyword), preOpenCard (message), startup (message), openBackground (message), preOpenStack (message), openStack (message), socketError (message), close socket (command), application (glossary), variable (glossary), standalone application (glossary), debug (glossary), command (glossary), main stack (glossary), group (glossary), socket (glossary), Standalone Application Settings (glossary), upload (glossary), download (glossary), message (glossary), handler (glossary), Internet library (library), Revolution custom library (library), library (library)

Tags: networking
