Internet Direct (Indy) Version 9.0.1 Beta
EIdSocketError.LastError
Indicates the last error code.

property LastError: Integer;
Description
LastError is the last socket error code and is used to provide the developer with flexibility when dealing with specific socket errors. This is set with the CreateError constructor.