N Device Close - FujiNetWIFI/fujinet-firmware GitHub Wiki
Description
Closes the client socket associated with the given IOCB; flushes TX buffer; discards RX buffer.
[!IMPORTANT] This does not close the associated listening socket for an IOCB. You must use the SPECIAL - UNLISTEN command to close a server socket that has been previously opened.
Parameters
- The IOCB of the channel to close
Returns
Examples
BASIC
For a client connection, assuming that IOCB #1 has been opened with:
OPEN #1,12,0,"N:TCP:192.168.1.8:2000"
Then you can close with:
CLOSE #1
For a server connection, assuming that IOCB #1 has been opened with:
OPEN #1,12,1,"N:TCP:2000"
Then you can close with
CLOSE #1:REM CLOSE CLIENT SOCKET
XIO 20,#1,0,0,"N:"