Delphi Socket Error 10054
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 about Stack Overflow the company Business Learn more about hiring developers
Socket Error 10054 Indy
or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x socket error 10054 connection reset by peer delphi Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it socket error 10054 ftp only takes a minute: Sign up recovering from “Connection Reset By Peer” Indy TCP Client up vote 7 down vote favorite 5 How should I be recovering in this situation? The server crashes, thus the connection has been abnormally closed.
Windows Socket Error 10054
Calls to almost everything result in "Connection Reset By Peer" exceptions. I seem to have fixed it by calling Disconnect on the TIdTCPClient object inside the except block, but it results in one final exception with the same message (which I have caught in the second try-except block). This is with Indy10 and Delphi XE2. try if not EcomSocket.Connected then EcomSocket.Connect(); except on e: Exception do begin try EcomSocket.Disconnect(); except MessageDlg('Connectivity to the server has been lost.', mtError, [mbOK], 0);
Netsis Socket Error 10054
end; end; end; delphi tcp indy share|improve this question edited May 9 '12 at 20:50 asked May 9 '12 at 12:54 Andy Clark 132113 Did you try to debug into TIdTCPConnection.Disconnect in IdTCPConnection.pas? Maybe a OnDisconnect handler is executed and uses the connection. Or the NotifyPeer plays a role, see also the comments in the source about different scenarios –mjn May 9 '12 at 13:45 Freeing the object and creating a fresh new one will help (but not help to find the reason for the exception) –mjn May 9 '12 at 13:46 I am not so much concerned with why I am getting an exception when calling disconnect. I just want to know how to properly recover from a situation like this. –Andy Clark May 9 '12 at 14:14 This is hard to say without knowing what the program does –mjn May 9 '12 at 14:57 This is what I consider to be relevant (so feel free to ask for more). The client is our GUI, which issues commands to a server within our system. The client should recognize when the connection has failed and attempt to reconnect until the connection has been re-established. I have it working exactly as I want now. When the server terminates correctly, it calls DisconnectNotifyPeers, and the connections are closed cleanly. When the server terminates abnormally, the clients will recognize this
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 about Stack Overflow the company Business Learn more about socket error 10054 jane hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask
Wsa Error 10054
Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Delphi + TidSMTP.Connect + Socket Error 10054 - Connection Reset by Peer up vote 0 down vote favorite I have a Delphi application which uses TidSMTP to send emails, well http://stackoverflow.com/questions/10516579/recovering-from-connection-reset-by-peer-indy-tcp-client is supposed to. When tested on our local mail server it works fine but as soon as I set it up to work with the external mail server I get the socket error 10054 - Connection Reset by Peer when it trys to perfrom the l_idSMTP.connect line of code I have setup the account I wish to use to send emails in Outlook on the same machine and it is able to successfully send emails so I am not http://stackoverflow.com/questions/18657243/delphi-tidsmtp-connect-socket-error-10054-connection-reset-by-peer sure why the Delphi application on the same machine is not? Below is my code try l_pConfigurator := TConfigurator.Create; l_idSMTP.Username := l_pConfigurator.SMTPUser; l_idSMTP.Password := l_pConfigurator.SMTPPass; l_idSMTP.Host := l_pConfigurator.SMTPHost; l_idSMTP.Port := strtoint(l_pConfigurator.SMTPPort); if l_pConfigurator.SMTPAuth = 'LOGIN' then begin l_idSMTP.AuthenticationType := atLogin; end; finally FreeAndNil(l_pConfigurator); end; l_idSMTP.Connect(30000); if l_idSMTP.Connected then l_idSMTP.Send(l_idMsg); Any assistance will be greatly appreciated delphi connection reset peer share|improve this question asked Sep 6 '13 at 11:53 MarkZA 364 2 Did you try to send a mail interactive from the command line using Telnet? (And are you sure that Outlook uses SMTP to talk to the server?) –mjn Sep 6 '13 at 14:54 Which version of Indy are you using? Connect(30000) looks like Indy 9. In Indy 10, use ConnectTimeout := 30000; Connect; instead. –Remy Lebeau Sep 6 '13 at 15:21 Maybe your ISP/ICP is blocking TCP port 25 –iMan Biglari Sep 7 '13 at 17:30 I will test with Telnet and try verify what Outlook is using. I configured Outlook the same way I did my application so assume it is SMTP –MarkZA Sep 8 '13 at 6:49 Yes the version I am using is Indy 9 –MarkZA Sep 8 '13 at 6:50 | show 1 more comment active oldest votes Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook. Your Answer dr
a Delphi5 Telnet server application, where a wireless handheld PC is used as terminal-emulation client. Sometimes the server application crashes with "Socket error 10054 Connection reset by peer" I think it http://www.delphigroups.info/2/31/194963.html has to do with the user walking too far away from the RF https://groups.google.com/d/topic/borland.public.delphi.internet.winsock/iF66SD-lSE0 control station, so connetion is lost in the middle of a transfer. Any ideas ? Ernst Gerlac Delphi Developer Fri, 23 May 2003 03:00:00 GMT Re:Socket error 10054 Connection reset by peer Quote> I use Indy 8.007b on a Delphi5 Telnet server application, where a > wireless handheld PC is used error 10054 as terminal-emulation client. > Sometimes the server application crashes with > "Socket error 10054 Connection reset by peer" > I think it has to do with the user walking too far away from the RF > control station, so connetion is lost in the middle of a transfer. > Any ideas ? update Indy. Ernst Gerlach ernst.gerl...@epost.de http://www.gerlach-mtl.de Marcel van Zogg Delphi Developer Fri, 23 May socket error 10054 2003 03:00:00 GMT Re:Socket error 10054 Connection reset by peer Quote>> I use Indy 8.007b on a Delphi5 Telnet server application, where a >> wireless handheld PC is used as terminal-emulation client. >> Sometimes the server application crashes with >> "Socket error 10054 Connection reset by peer" >> I think it has to do with the user walking too far away from the RF >> control station, so connetion is lost in the middle of a transfer. >> Any ideas ? >update Indy. >Ernst Gerlach So it's known problem, which is solved in 8.009b ? Are you sure ? Marcel van Zogg Delphi Developer Fri, 23 May 2003 03:00:00 GMT Re:Socket error 10054 Connection reset by peer Quote>So it's known problem, which is solved in 8.009b ? Are you sure ? I know am able to reproduce it (with 8.009b) Just after a Connection.Readln(#13,2000) i disconnect my network cables and then after a while i get the error. But i think i found something: procedure TForm1.IdTCPServer1Execute(AThread: TidPeerThread); begin try With (Athread as TMvZPeerThread) do begin ....... Connection.Write(c
van GoogleInloggenVerborgen veldenZoeken naar groepen of berichten