Internet Direct (Indy) Version 9.0.2 Beta
TIdSocketHandle.CloseSocket
Closes a socket.

procedure CloseSocket(const AResetLocal: boolean); virtual;
Parameters
const AResetLocal: boolean = True
Clears the local IP address and Port number when True.

Description
CloseSocket is a procedure to close a socket. CloseSocket allows the protocol stack to shutdown and release the socket handle for the descriptor. HandleAllocated is set to False to indicate to that the socket is no longer available to other threads of execution. CloseSocket has no effect if HandleAllocated is False.

AResetLocal indicates that rest should be called for the local connection.

CloseSocket is affected by options used in SetSockOpt for Id_SO_LINGER.