Can you abort an Indy connection call?

I have a connection that I give 20 seconds for a timeout (slow link). I need to allow my user to cancel this connection call.

I already have a connection going on in the stream so that I can save the GUI, but how do I tell Indy to cancel? I also have to call a cancellation from the main thread because the call to the connection is blocked. Is it possible?

This is for C ++ Builder, but Delphi's answer will be fine.

+3
source share
2 answers

Connect() - Disconnect() , , Connect(). Disconnect(), , Connect() .

+8

, TIdAntiFreeze, Process() , , , .

TIdAntiFreeze, . IdleTimeout, DoProcess().

IOHandler, TIdConnectThread, AntiFreeze, .

0

Source: https://habr.com/ru/post/1776318/


All Articles