Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Please Help with Indy Components

Status
Not open for further replies.

dllCoRupT626

Programmer
Oct 15, 2002
12
0
0
US
I keep getting Error 'Socket Error # 10061 Connection Refused' when i try to connect to my server.

I get this error when i try using the Server and Client Demos that come with Indy to.

Can someone please help me

I did set all of the properties

My Client:

************

Code:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, IdBaseComponent, IdComponent, IdTCPConnection,
  IdTCPClient;

type
  TForm1 = class(TForm)
    IdTCPClient1: TIdTCPClient;
    Button1: TButton;
    Edit1: TEdit;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin

        while IdTCPClient1.Connected = False do begin

                IdTCPClient1.Connect;

        end;

        if IdTCPClient1.Connected = True Then Edit1.Text := 'Connected';

end;

end.

********

My Server:

************

Code:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, IdBaseComponent, IdComponent, IdTCPServer;

type
  TForm1 = class(TForm)
    IdTCPServer1: TIdTCPServer;
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin

        IdTCPServer1.Active := True;

end;

end.

*********
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top