Delphi Indy Socket Error 10061 Connection Refused
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 socket error 10061 connection refused smtp more about Stack Overflow the company Business Learn more about hiring developers or socket error 10061 connection refused hatası posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community
Socket Error 10061 Connection Refused Jane
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 Socket Error while making tcp ip connection in delphi up
Ftp Socket Error 10061 Connection Refused
vote 2 down vote favorite I am using indy client to make tcp ip connection with a server(IP address and port). I have written following code on the click of a button. I trying to send Hello msg to server and then trying to read the message from server. procedure TForm1.Button1Click(Sender: TObject); var sMsg : string; begin try IdTCPClient1.Port := xxxx; //Set port to connect to IdTCPClient1.Host := socket error 10061 connection refused windows 7 'xxx.xxx.x.xxxx'; //Set host to connect to IdTCPClient1.Connect; //Make connection sMsg := IdTCPClient1.Socket.ReadLn; //Read the response from the server ShowMessage(sMsg); except on E : Exception do begin ShowMessage('Connection Error: ' + E.Message); exit; end; end; end; But I am getting socket error 10061 connection refused while debugging at the line IdTCPClient1.Connect; //Make connection I tried to make tcp connection with server on given port and ip using telnet command on cmd (telnet ip port) and I got the following message "Connection established to xxx.xxx.xx.xxx, there could be no connection made with the host, on port xxxx: connection errors" Please suggest me the solution for this... Thanks all. Now I am able to use the port. So no error at IdTCPClient1.Connect; //Make connection. But now nothing is happening at the next line where I am trying to read data from the server (sMsg := IdTCPClient1.Socket.ReadLn;) When I try from telnet, some miscellaneous characters are read from server. What could be the reason for this? delphi sockets networking tcp delphi-xe2 share|improve this question edited Nov 20 '12 at 7:19 asked Nov 19 '12 at 5:57 user1556433 2 Is there actually a program running on the server that listens to the specific port? Also, have
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
Socket Error 10061 Eol Connection Refused
about Stack Overflow the company Business Learn more about hiring developers or posting socket error 10061 ppsspp ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack prtg socket error 10061 connection refused Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Indy SMTP server is refusing connection up vote -1 down vote http://stackoverflow.com/questions/13448429/socket-error-while-making-tcp-ip-connection-in-delphi favorite I am at the very beginning of a new project, in an area which is new to me. I want to code an application which which will act as a middle-man Windows based email clients, such as Thunderbird, etc, and a remote SMTP server. The reason being that my application will perform some slight manipulation of emails as they pass through. So, I figured that I will want http://stackoverflow.com/questions/23006388/indy-smtp-server-is-refusing-connection a TIdSMTPServer. I decided to use port 6789, in case of any possible conflict (which I doubt, but ... j.i.c). I set the SMTP server's DefaultPort to 6789, and I also bound the SMTP server to 127.0.0.1:6789 in the Bindings property (and, as @SirRufo pointed out, I set the server.active to true).. Now, I added a button with some test code, based on this SO question. The only change I made was to change the port from SMTP.Port := 465; to SMTP.Port := IdSMTPServer.DefaultPort (host is left as 127.0.0.1). However, when I attempt to connect my IdSMTPServer's IdSMTPServerConnect() method is never called and I get an exception, "EIdSocketError # 10061 Connection refused". Any idea what I am doing wrong? (and is there any guide or tutorial describing the use of IdSMTPServer?) delphi smtp indy10 share|improve this question edited Apr 11 '14 at 8:20 asked Apr 11 '14 at 7:37 Mawg 10.6k56177345 2 Did you activate the server? IdSMTPServer1.Active := True –Sir Rufo Apr 11 '14 at 7:58 add a comment| 1 Answer 1 active oldest votes up vote 2 down vote accepted There is no problem to connect to the TIdSMTPServer type TForm1 = class( TForm ) IdSMTP1 : TIdSMTP; IdSMTPServer1 : TIdSMTP
delphi21 Folks, Title pretty much says it all but here's the code in case it is just me being a plank: http://www.delphigroups.info/2/1/215856.html var ServerFileList: TStringList; sFileSpec: string; begin if not IdFTP.Connected then FTPConnect(zHost, zUsername, zPassword); ServerFileList:= TStringList.Create; try sFileSpec:= '*.wcc'; IdFTP.List(ServerFileList, sFileSpec, FALSE); // do something here with ServerFileList finally ServerFileList.Free; end; end; I'm using Delphi 6 Pro update pack 2. Thanks, James Remy Lebeau (TeamB) Delphi Developer 2006-10-26 04:05:25 PM Re:IdFTP.List throws Socket Error socket error #10061 Connection Refused if filespec not found "James H"