User's Manual

Table Of Contents
Direct Socket Interface
AT+i Programmer‘s Manual Version 8.32 13-14
13.12 +iSCLS Close Socket
Syntax:
AT+i[!]SCLS:<hn>
Closes a TCP/UDP socket.
If the socket is the only open socket and the stay online flag (!) is
not specified, iChip terminates the Internet session and goes
offline.
Parameters:
<hn>
A TCP/UDP socket handle of an open socket
Command Options:
<hn>
Must have been obtained by a previous execution of an
AT+iLTCP, AT+iSTCP or AT+iSUDP command during the
current Internet mode session. Or a socket accepted by a
listening socket.
A socket is always flushed before being closed. TCP sockets are
disconnected from the remote host server in an orderly manner.
!
Stay online after completing the command.
Result Code:
I/OK
If <hn> is a handle to an open socket
I/ERROR
Otherwise
Followed by:
I/DONE
After successfully closing the last open socket. Allow a 2.5
seconds delay for iChip re-initialization following an Internet
mode session.
-or-
I/ONLINE
After successfully closing the socket, while additional sockets
are still open or if the stay online flag (!) is specified.
-or-
I/ERROR
Otherwise