0

I have a lot of programs that use INDY 9 in BDS2007. I'm porting them to Delphi 10.4 but here there is INDY 10.

It is possible to remove INDY 10 (unused at moment) and install/compile INDY 9 in Delphi 10.4? Before making mistakes I ask if someone already made that with success.

Best regards Silverio

  • 3
    I strongly suggest to NOT replace `Indy 10` with `Indy 9`! `Indy 10` includes latest features and standards updates. – Tom Brunberg Nov 05 '20 at 08:52
  • 2
    Is Indy 9 compatible with Unicode string type introduced with Delphi 2009 (I don't think so!)? Be prepared for a lot of trouble, crazy side effects or even compilation errors if you try to use such an outdated version with current IDE versions. – Delphi Coder Nov 05 '20 at 09:40
  • @DelphiCoder No, Indy 9 is not compatible with Unicode at all. – Remy Lebeau Nov 06 '20 at 16:55

1 Answers1

1

Indy 9 is NOT compatible with IDE/compiler versions after BDS 2007. Beyond that, you MUST upgrade to Indy 10. Everything you can do in Indy 9 can be done in Indy 10, though the syntax may be slightly different, depending on what functionality you are using exactly.

Remy Lebeau
  • 555,201
  • 31
  • 458
  • 770
  • Thanks Remy Actually, I use ReadFromStream, not available in Indy10, to get not-blocking access to the incoming buffer. The sender sends a continuous frame of packets delimited by a packet Head ({) and a packet tail (}) encoded ASCII85: paste.ofcode.org/Ap5CYv5wndHvWXnG5HW39Y' – Silverio Diquigiovanni Nov 06 '20 at 12:53
  • *"I use `ReadFromStream`, not available in Indy10*" - yes, it is. Most of the reading/writing methods of `TIdTCPConnection` in Indy 9 were moved to `TIdIOHandler` in Indy 10. So instead of doing `Client.ReadStream(...)`, you would now do `Client.IOHandler.ReadStream(...)`. Likewise, the `TIdTCPConnection.InputBuffer` was also moved to `TIdIOHandler`. That being said, the code you linked to can be rewritten in Indy 10 using the `InputBuffer.IndexOf()`, `InputBuffer.Remove()`/`IOHandler.Discard()`, and `InputBuffer.ExtractTo...(...)` methods. – Remy Lebeau Nov 06 '20 at 16:52