I have noticed that I receive an EIdSocketError with LastError = 10054 or 10053 when the device I'm talking to sends a RESET response. Which makes sense, given 10054 is Connection Reset By Peer.
So is there anything I can check in Indy to determine if this has ocurred rather than wrapping my code in try/except block and looking for 10054 or 10053 error codes?
One scenario I encountered was the modem replied with a RESET reply after I connected (Indy didn't raise an exception) so from my point of view the connection succeeded. I then attempted to write to the socket (ie send a packet using TidTCPClient) and the 10054 error was raised.
Is it possible to see this RESET reply at all?
Thanks