Thanks for the tips. However, Sock.AbortSocket doesn't work in my case (I'm using synapse in Lazarus/FreePascal on 64 bit Linux)
It seems that HeartbeatRate is what I was looking, but I have one question. Is this method really safe? I mean, there is no chance for thread deadlock when I call Abort from main thread? Dnia 2010-10-13, śro o godzinie 12:58 +0200, EarMaster - Hans Jakobsen pisze: > If you find a solution, let us know. > > My own solution to this problem was to set FreeOnTerminate and then leave > the thread when the user aborted the connection. This way it closes on its > own when the socket is released and the user get an immediate response to > his abort request. However, it would be better if it was possible to Abort > the connection in all situations. > > > Best regards, > Hans Jakobsen > EarMaster ApS > [email protected] > > EarMaster.com - because in music we're all ears! > > > > > -----Original Message----- > From: Dibo [mailto:[email protected]] > Sent: Tuesday, October 12, 2010 1:14 PM > To: [email protected] > Subject: [Synalist] Aborting HTTPMethod > > Hi, > > I have THTTPSend created and running in thread. Can I somehow safely > abort connection from main thread when THTTSend.HTTPMethod takes too > long? This socket have procedure Abort: > > # {:You can call this method from OnStatus event for break current > data > # transfer. (or from another thread.)} > # procedure Abort; > > But it doesn't work with HTTPMethod('GET', > 'http://some.php.sleep.script'); > I tried change Timeout to 1 but it doesn't help. > > Regards > > > ---------------------------------------------------------------------------- > -- > Beautiful is writing same markup. Internet Explorer 9 supports > standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. > Spend less time writing and rewriting code and more time creating great > experiences on the web. Be a part of the beta today. > http://p.sf.net/sfu/beautyoftheweb > _______________________________________________ > synalist-public mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/synalist-public > > > ------------------------------------------------------------------------------ > Beautiful is writing same markup. Internet Explorer 9 supports > standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. > Spend less time writing and rewriting code and more time creating great > experiences on the web. Be a part of the beta today. > http://p.sf.net/sfu/beautyoftheweb > _______________________________________________ > synalist-public mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/synalist-public > ------------------------------------------------------------------------------ Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today. http://p.sf.net/sfu/beautyoftheweb _______________________________________________ synalist-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/synalist-public
