Delphi Indy Socket Error 10053
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more
Delphi Asynchronous Socket Error 10053
about Stack Overflow the company Business Learn more about hiring developers or posting ads socket error 10053 software caused connection abort delphi with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow
Delphi Indy Socket Example
is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up How to avoid getting an error 10053 (WSAECONNABORTED) if a HttpGet operation socket error 10053 windows live mail in Android is lasting too long? up vote 3 down vote favorite I have an Android application communicating with a Delphi 2006 web service application using Indy 10 TIdHttpServer (coming with Delphi 2006). The Delphi application generates a big XML file and serves this. The XML generation may last more than 5 minutes. If the duration of GenerateXml() is more than about 5 minutes (*), I detect an error 10053 socket error 10053 error number 0x800ccc0f in TIdHTTPResponseInfo.WriteContent if running in the Delphi IDE: Socket Error # 10053 Software caused connection abort. However, on the android side nothing is detected and the HttpGet-call lasts forever. My questions are: 1.) Why do I get the error 10053 and how can I avoid it? It seems like android times out the connection, but http.socket.timeout is set to infinite. and 2.) What can I do to detect such an error on the client side (other than setting timeout, which would have to be too big to be useful)? Can I do something in TIdHttpServer.OnException? Here is my code. Android - download function, which is run inside an AsyncTask: protected static HttpEntity downloadEntity(String url) throws IOException { HttpClient client = new DefaultHttpClient(); //Check because of Error 10053: but timeout is null -> infinite Log.d("TAG", "http.socket.timeout: " + client.getParams().getParameter("http.socket.timeout")); HttpGet get = new HttpGet(url); HttpResponse response; try { //in case of Error 10053 the following call seems to last forever (in PlainSocketImpl.read) response = client.execute(get); } catch (ClientProtocolException e) { //... } //... return response.getEntity(); } Delphi implementation of TIdHttpServer.OnCommandGet: procedure ServeXmlDoc(XmlDoc: IXMLDocument; ResponseInfo: TIdHTTPResponseInfo); var TempStream: TMemoryStream; begin ResponseInfo.ContentType := 'text/xml'; TempStream := TMemoryStream.Create; XMLDoc.SaveToStream(TempStream); ResponseInfo.FreeContentStream := True; ResponseInfo.ContentStream := TempStream; end; procedure TMyService.HTTPServerCommandGet(AContext: TIdContext; R
for Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Ask a Question Ask for Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Expand Search Submit Close Search Login Join Today Products BackProducts Gigs Live Careers Vendor Services Groups Website Testing Store Headlines Experts Exchange > Questions > Server socket error 10053 Want to Advertise Here? Solved Server socket error 10053 Posted on http://stackoverflow.com/questions/18601630/how-to-avoid-getting-an-error-10053-wsaeconnaborted-if-a-httpget-operation-in 2004-12-08 Delphi 1 Verified Solution 3 Comments 7,222 Views Last Modified: 2008-07-15 I have a project on a server pc controlling I/O's. I am using the server socket to update three other pc's over a lan on the status of the server computer. I can log in and out of the server computer with any of https://www.experts-exchange.com/questions/21234746/Server-socket-error-10053.html the client computers. However if a simulate a power failure in one of the client pc's I keep getting the error asynchronous socket error 10053. What is the best way to trap this error without brining down the server or the other two client computers? 0 Question by:Al_Shepstone Facebook Twitter LinkedIn Google Best Solution byjimy7s This error is occur when the connection is lost, and to avoid this error you should use one of this ways : you know the server allways listenning for connection and when connection is made then the Go to Solution 3 Comments LVL 13 Overall: Level 13 Delphi 11 Message Expert Comment by:BlackTigerX2004-12-08 that's a "connection aborted due to timeout or other failure (10053)" basically unexpected failure, like in your case you just need to - check that you have a connection before enterying the "send/receive messages section" - have exception handling when sending/receiving and if you get any exception trap it there instead of leting it populate to the
/cnf/article/0/permalink.art-ng1921q4509 Printer Friendly Thread Parent Sibling Child Thread Search Previousin search Next insearch Previousin thread Next inthread 16-Jul-2010 Re: Socket Error # 10053 Software caused connection abort "Francisco Alvarado" <✉brainsoftware.net> socket error wrote in message news:✉forums.embarcadero.com... > After running flawlessly for 3 to 4 years, my application > (Delphi 5, Indy 9.0.18) began to send "Socket Error > # 10053 Software caused connection socket error 10053 abort". What did you change on the system recently? APIs do not just spontaneously stop working after years for no reason. BTW, the last Indy 9 version was 9.0.50. > I can't find TIdMessage component, which one replaced it? Nothing. TIdMessage still exists in Indy 10. -- Remy Lebeau (TeamB) FYI: Phrase searches are enclosed in either single or double quotes 24-Jul 11:00 utc Operating system upgrade in process, expect some down time. Originally created by [Tamarack] Sun, 09 Oct 2016 00:44:20 UTC Copyright © 2009-2016 HREF Tools Corp.