Einzelnen Beitrag anzeigen

spiderb

Registriert seit: 18. Jul 2007
17 Beiträge
 
#9

Re: Problem mit Tcp/Ip Verbindung zwischen Delphi und Blitz3

  Alt 28. Feb 2008, 19:48
kann es iwi sein, dass da dann garnix passiert
Delphi-Quellcode:
unit Unit1;

interface

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

type
  TForm1 = class(TForm)
    TCPServer: TIdTCPServer;
    Memo1: TMemo;
    procedure TCPServerExecute(AContext: TIdContext);
    procedure TCPServerConnect(AContext: TIdContext);
    procedure TCPServerDisconnect(AContext: TIdContext);
  private
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.TCPServerConnect(AContext: TIdContext);
begin
  Memo1.Lines.Add('Verbindung: ' + AContext.Binding.PeerIP);
end;

procedure TForm1.TCPServerDisconnect(AContext: TIdContext);
begin
  Memo1.Lines.Add('Verbindungsabbruch: ' + AContext.Binding.PeerIP);
end;

procedure TForm1.TCPServerExecute(AContext: TIdContext);
var str : string;
begin
  str := AContext.Connection.IOHandler.ReadLn;
  Memo1.Lines.Add('Nachricht: ' + str);
end;

end.
und im objektispektor hab ich nur active= true und den defaultport eingegeben.
  Mit Zitat antworten Zitat