Go Up to Responding to Socket Events
Client and server sockets generate System.Win.ScktComp.TCustomSocket.OnError events when they receive error messages from the connection. You can write an OnError event handler to respond to these error messages. The event handler is passed information about
- What socket object received the error notification.
- What the socket was trying to do when the error occurred.
- The error code that was provided by the error message.
You can respond to the error in the event handler, and change the error code to 0 to prevent the socket from raising an exception.