Internet Direct (Indy) Version 9.0.2 Beta
TIdStack.CheckForSocketError
Performs a check for specific socket error numbers.

function CheckForSocketError(const AResult: integer): boolean; overload;
function CheckForSocketError(const AResult: integer; const AIgnore: array of integer): boolean; overload;
Parameters
const AResult: integer = Id_SOCKET_ERROR
Error number to ne checked. Default value is Id_SOCKET_ERROR.

Returns
Boolean - True when a the last error is ignored.

Description
CheckForSocketError is a Boolean function used to perform a check for specific socket error numbers. When AResult does not contain Id_SOCKET_ERROR or AIgnore is an empty array, all socket errors are detected.

If the last socket error is contained in AIgnore, the return value is True. Under all other conditions the return values is False. If a socket error si detected and not ignored, RaiseSocketError is called with the socket error number detected.