Delphi XE HTTP: error "Socket Error #10054 Connection reset by peer" [Edit]

Communication type is set to HTTP, LifeCycle is set to Invocation.
Invocation represents a stateless connection, but when the network connection drops, the client throws the error "Socket Error #10054 Connection reset by peer". Are there any other properties to set up apart from LifeCycle?
0
Irina
11/16/2010 6:24:12 AM
📁 embarcadero.datasnap
📃 643 articles.
⭐ 1 followers.

💬 6 Replies
👁️‍🗨️ 6142 Views


Hi Irina,
> Communication type is set to HTTP, LifeCycle is set to Invocation.
>
> Invocation represents a stateless connection, but when the network connection drops, the client throws the error "Socket Error #10054 Connection reset by peer". Are there any other properties to set up apart from LifeCycle?
I guess you could set the Connected property of the TSQLConnection 
component to True right before every call, and back to False right 
afterwards.
Are you callling server methods, or using a TDSProviderConnection at the 
client side?
Groetjes,
           Bob Swart
-- 
Bob Swart Training & Consultancy (eBob42.com) Forever Loyal to Delphi
Chairman Delphi Development Network (DDN) powered by SDN - www.sdn.nl
Embarcadero Technology Partner - Delphi & RAD Studio Reseller BeNeLux
http://twitter.com/eBob42 LinkedIn: http://nl.linkedin.com/in/drbob42
Delphi Win32 & .NET books on Lulu.com: http://stores.lulu.com/drbob42
Personal courseware + e-mail support http://www.ebob42.com/courseware
Blog: http://www.drbob42.com/blog - RSS: http://eBob42.com/weblog.xml
0
Bob
11/16/2010 6:27:06 AM
> I guess you could set the Connected property of the TSQLConnection 
> component to True right before every call, and back to False right 
> afterwards.
> 
> Are you callling server methods, or using a TDSProviderConnection at the 
> client side?
Both. Is there a way to intercept TDSProviderConnection calls via TSQLConnection?
0
Irina
11/16/2010 6:49:01 AM
Hi Irina,
>> Are you callling server methods, or using a TDSProviderConnection at the
>> client side?
>
> Both. Is there a way to intercept TDSProviderConnection calls via TSQLConnection?
If you're using a stateless mode (using PacketRecords property and 
OnBeforeGetRecords events), then you can try to close the TSQLConnection 
in the OnAfterGetRecords. Otherwise, you can close TSQLConnection right 
after you open the TClientDataSet.
Are you using an ISAPI server or a stand-alone HTTP server? I'm not 
seeing the socket error #10054, but would like to know how to 
"reproduce" it, so I can test what to do about it (for my book, which is 
almost finished and should be ready by tomorrow) ;-)
Groetjes,
           Bob Swart
-- 
Bob Swart Training & Consultancy (eBob42.com) Forever Loyal to Delphi
Chairman Delphi Development Network (DDN) powered by SDN - www.sdn.nl
Embarcadero Technology Partner - Delphi & RAD Studio Reseller BeNeLux
http://twitter.com/eBob42 LinkedIn: http://nl.linkedin.com/in/drbob42
Delphi Win32 & .NET books on Lulu.com: http://stores.lulu.com/drbob42
Personal courseware + e-mail support http://www.ebob42.com/courseware
Blog: http://www.drbob42.com/blog - RSS: http://eBob42.com/weblog.xml
0
Bob
11/16/2010 7:24:58 AM
> Are you using an ISAPI server or a stand-alone HTTP server? I'm not 
> seeing the socket error #10054, but would like to know how to 
> "reproduce" it, so I can test what to do about it (for my book, which is 
> almost finished and should be ready by tomorrow) ;-)
Stand-alone HTTP server.
0
Irina
11/17/2010 9:13:35 AM
> Invocation represents a stateless connection, but when the network connection drops, the client throws the error "Socket Error #10054 Connection reset by peer". Are there any other properties to set up apart from LifeCycle?
Misconseption. A stateless connection term is related to the server objects creation, not a client/server connection. So basically I can only simulate a client/server stateless connection by connection/disconnection sqlconnection.
Edited by: Irina Kushnirik on Nov 17, 2010 1:23 AM
0
Irina
11/17/2010 9:23:37 AM
Hi Irina,
> A stateless connection term is related to the server objects creation, not a client/server connection. So basically I can only simulate a client/server stateless connection by connection/disconnection sqlconnection.
AFAIK, that's correct.
Groetjes,
           Bob Swart
-- 
Bob Swart Training & Consultancy (eBob42.com) Forever Loyal to Delphi
Chairman Delphi Development Network (DDN) powered by SDN - www.sdn.nl
Embarcadero Technology Partner - Delphi & RAD Studio Reseller BeNeLux
http://twitter.com/eBob42 LinkedIn: http://nl.linkedin.com/in/drbob42
Delphi Win32 & .NET books on Lulu.com: http://stores.lulu.com/drbob42
Personal courseware + e-mail support http://www.ebob42.com/courseware
Blog: http://www.drbob42.com/blog - RSS: http://eBob42.com/weblog.xml
0
Bob
11/17/2010 1:58:20 PM
Reply: