Implementation of TMyIOHandler

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
dkloke
Posts: 3
Joined: Mon 30 Jan 2006 21:30

Implementation of TMyIOHandler

Post by dkloke » Thu 12 Mar 2009 12:03

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!

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Fri 13 Mar 2009 08:48

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.

dkloke
Posts: 3
Joined: Mon 30 Jan 2006 21:30

Post by dkloke » Fri 13 Mar 2009 10:09

Thanks! I'll take a look at that section.

Post Reply