Avisaro Online Documentation - Wiki
Impressum Kontakt Sitemap

CLOSE

Description

This command closes files and network connections. For files that are open for writing, CLOSE flushes all buffers to disk before it closes the them. TCP connections are closed gracefully. UDP channels are inactivated.

CLOSE takes one argument that can be either a file/network handle or the keyword ALL. In case of ALL, all open files are closed. Network handles are not affected by ALL.

Parameters

An open handle or ALL to close all files

Return value

ERR_NOT_OPEN (28) if the specified handle is not an open file or network connection.
ERR_ARGUMENT (4) if the argument was rejected.
File System errors (13...25) if the FS could not close the file.
ERR_UNSPEC (7) on internal errors (very unlikely).

Examples

CLOSE 101

Closes TCP connection with the handle number 101.

CLOSE 13

Closes an open file with the handle number 13

CLOSE ALL

Closes all open file but keeps network connections open

Remarks

An application should read all receive buffers of a network connection until they're empty, before a CLOSE command is performed. Otherwise, all buffered data will be lost.