Topic Path: Symbol Reference > Classes > TIdStackBSDBase Class > TIdStackBSDBase Methods > CheckForSocketError Method > CheckForSocketError Method (Integer)
ContentsIndexHome
PreviousUpNext
TIdStackBSDBase.CheckForSocketError Method (Integer)

Determines if a numeric response indicates a socket error has occurred.

function CheckForSocketError(
    const AResult: Integer
): Integer; overload;
Parameters 
Description 
AResult 
Numeric respond code to check for a socket error number. 

Integer - The numeric response code when no socket error has occurred.

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 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. 

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.

TIdStackBSDBase.CheckForSocketError 

TIdStackBSDBase.NewSocketHandle 

TIdStackBSDBase.Receive

Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.