Shiny Language Reference
Language Reference > Web Functions
wclose
bool wclose(web WebVar);
Synonyms:
bool webclose(web WebVar);
Closes a previously opened website
The WCLOSE statement closes an open connection and frees resources allocated by a previous call to WOPEN. Although WCLOSE is called automatically by a WEB variable when it is destroyed, it is very good practice to call WCLOSE explicitly. This avoids any potential confusion in code due to network timeouts.
Parameters
WebVar
A variable declared as type WEB to close.
Return Value
TRUE if closing the site suceeded, otherwise FALSE. The return value of WCLOSE can be used for further operations.
Example Code
web BrassSite;
bool Result = wopen(BrassSite, "http://www.amazingbrass.co.uk");// Alternative testing:
if(wopen(BrassSite, "http://www.amazingbrass.co.uk") == FALSE)
 // handle error
else
 wclose(BrassSite);