Internet Direct (Indy)
|
Determines if a numeric response indicates a socket error has occurred.
function CheckForSocketError( const AResult: Integer; const AIgnore: array of Integer ): Integer; overload;
Parameters |
Description |
AResult |
Numeric respond code to check for a socket error number. |
AIgnore |
Numeric responses to ignore as socket errors. |
Integer - The numeric response code when no socket error has occurred, or the error number is ignored.
CheckForSocketError is an overloaded Integer function used to determine if the numeric value in AResult indicates that a socket error has occurred. When AResult contains the constant value Id_SOCKET_ERROR, the value from WSGetLastError is compared to the elements in AIgnore. If AResult is not found in AIgnore, the RaiseSocketError method is called using the value returned from WSGetLastError.
The return value for CheckForSocketError is the value in AResult when no socket error has occurred, or the value from WSGetLastError when it occurs in AIgnore.
CheckForSocketError is used in NewSocketHandle to determine if a socket handle was successfully allocated for the desired IP family, socket type, protocol, and IO mode.
CheckForSocketError is used in Receive to determine if the read operation was successfully completed.
Internet Direct (Indy) version 10.1.5
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved. Website http://www.indyproject.org. Post feedback to the Indy Documentation newsgroup. |