Page 1 of 1

Implementation of TMyIOHandler

Posted: Thu 12 Mar 2009 12:03
by dkloke
Can I get some information or an example of a TMyIOHandler?

I need to make the client application react gracefully when a connection is lost, whether from a pulled LAN cable or a failure of the Internet connection (accessing a remote server).

OnConnectionLost never fires. When should it?

I am hoping that a TMyIOHandler can monitor network access without actually having to (re)write the entire IO code block. Is this correct?

If not, please advise on an approach to handling network connection losses.

Thanks!

Posted: Fri 13 Mar 2009 08:48
by Plash
The IOHandler property is not related to the OnConnectionLost event. IOHandler is used to encrypt the connection.

To enable the event, set the LocalFailover option of TMyConnection to True. Several other conditions also should be satisfied for this event. You can find these conditions in the 'Using MyDAC / Working in an Unstable Network' topic of the MyDAC help.

Posted: Fri 13 Mar 2009 10:09
by dkloke
Thanks! I'll take a look at that section.