Delphi Socket Error
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss delphi socket winsock the workings and policies of this site About Us Learn more indy socket error 10053 about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow delphi connection reset by peer Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping 10053 software caused connection abort delphi each other. Join them; it only takes a minute: Sign up Socket Error while making tcp ip connection in delphi up 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
Delphi Socket Error 10060
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 := '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 (
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
Delphi Asynchronous Socket Error 10061
the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask 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 DataSnap server socket error 10061 up vote 0 down vote favorite I have decided to move from http://stackoverflow.com/questions/13448429/socket-error-while-making-tcp-ip-connection-in-delphi SOAP servers to DataSnap servers & REST. I have viewed and followed several tutorials and even tried the DXE5 demos but I keep getting the same result. The issue is that I cannot connect the TSQLConnection on the client app to the DataSnap server that is running. Here is the Code : Socket Error # 10061 Connection refused.. OS = Windows 7 64bit RAD Studio XE5 Update 2 Following DataSnap multi-tier video http://stackoverflow.com/questions/22678393/datasnap-server-socket-error-10061 tutorial by Pawel Glowacki (and ohters). In creating a Datasnap client/server app, I cannot connect the client TSQLConnection to the DSServer. The server is running (localhost)! Firewal de-activated. Added port 211 to Windows Firewall Inbound & Outbound rules. I have tried creating a DataSnat REST application and the same error occurs. I get the same results when doing this in DXE and DXE3. Steps to reproduce Create Datasnap server (Tried both DataModule & DSServerModule). Leave default port to 211 (Have also tried several other ports (8080, 9000). Run the server. All is OK up to here. Create a VCL Form App. Add a TSQLConnection to Main form. Set driver to DataSnap. CommunicationProtocol = tcp/ip. DataSnapCOntext = datasnap/ HostName = localhost (have tried 127.0.0.1 and my computer's IP address). LoginPropt = False. Run server. Start server. Open in browser works correctly. Set Connected property on TSQLConnection to true. Socket error 10061 is generated and I cannot get past this. Here is the stack trace. [5110E67F]{IndySystem190.bpl} IdStack.TIdStack.RaiseSocketError (Line 771, "IdStack.pas" + 42) + $21 [5110E606]{IndySystem190.bpl} IdStack.TIdStack.RaiseLastSocketError (Line 725, "IdStack.pas" + 1) + $F [5110E571]{IndySystem190.bpl} IdStack.TIdStack.CheckForSocketError (Line 699, "IdStack.pas" + 2) + $3 [5110A9F4]{IndySystem190.bpl} IdStackWindows.TIdStackWindows.Connect (Line 1771, "IdStackWindows.pas" + 20) + $13 [50DF5849]{IndyCore190.bpl} IdSocketHandle.TIdSocketHandle.Connect (Line 294, "IdSocketHandle.pas" + 1) + $25 [50E01CF9]{IndyCore190.bpl} IdIOHandlerStack.TIdIOHandlerStack.ConnectClient (Line 344, "IdIOHandlerStack
here for a quick overview of the site Help Center Detailed answers to any http://stackoverflow.com/questions/13331049/delphi-socket-error 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 http://www.indyproject.org/kb/wherecanifindsocketerror.htm about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack socket error 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 socket error up vote 1 down vote favorite Trying to understood how to use ServerSocket and ClientSocket in Delphi. I made a simple chat programm but after client delphi socket error sends first message this error apperas (it happens during sending - just after server get's the message ) Windows socket error: Запрос на отправку или получение данных (when sending ona datagram socket using a sendto call)no adress was supplied (10057), on API 'getpeername' Heres server code unit Servert; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ScktComp; type TForm1 = class(TForm) ServerSocket: TServerSocket; PortLabel: TLabel; Port: TEdit; Protocol: TGroupBox; mmoServer: TMemo; btnStart: TButton; btnStop: TButton; btnClear: TButton; btnEnd: TButton; btnSend: TButton; edtMsg: TEdit; lblUser: TLabel; procedure btnStartClick(Sender: TObject); procedure btnStopClick(Sender: TObject); procedure btnClearClick(Sender: TObject); procedure FormDestroy(Sender: TObject); procedure btnEndClick(Sender: TObject); procedure ServerSocketClientConnect(Sender: TObject; Socket: TCustomWinSocket); procedure ServerSocketClientDisconnect(Sender: TObject; Socket: TCustomWinSocket); procedure ServerSocketClientError(Sender: TObject; Socket: TCustomWinSocket; ErrorEvent: TErrorEvent; var ErrorCode: Integer); procedure ServerSocketClientRead(Sender: TObject; Socket: TCustomWinSocket); procedure btnSendClick(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; Usercount: Integer; implementation {$R *.dfm} procedure TForm1.btnStartClick(Sender