Autor Beitrag
NemesisoD
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 43



BeitragVerfasst: So 25.05.08 11:20 
Hallo zusammen,

ich habe mit die Demo angeguckt und ausprobiert, allerdings funktioniert dies nicht bei mir, der Server Empfängt nichts.

Hier mal den Source vom Server:
ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
procedure TForm1.IdTCPServerExecute(AContext: TIdContext);
var
  connected: boolean;
  line: string;
  connectionNumber: integer;
begin
  { [!] NOTE: since this is a simple example to show how SSL works, we did not bother to synchronize
              any of the VCL/display calls - remember that the VCL is NOT thread-safe! }


  { Find an open connection... [!] }
  connectionNumber:= 0;
  while (ledConnected[connectionNumber].Brush.Color = clOn) do inc(connectionNumber);

  ledConnected[connectionNumber].Brush.Color:= clOn;  { show that we're connected [!] }

  AContext.Connection.IOHandler.WriteLn('Hello');
  connected:= true;
  while connected do begin
    try
      line:= AContext.Connection.IOHandler.ReadLn;
      AContext.Connection.IOHandler.WriteLn('>>'+line);
      memo1.Lines.add(format('[%d] %s',[connectionNumber,line]));
      if (ansiUpperCase(line) = 'BYE'or (ansiUpperCase(line) = 'QUIT'then begin
        AContext.Connection.Disconnect;
        connected:= false;
      end{ if (ansiUpperCase(line) = 'BYE') or (ansiUpperCase(line) = 'QUIT') }
    except
      connected:= false;
    end{ try/except }
  end{ do while connected }

  ledConnected[connectionNumber].Brush.Color:= clOff;    { show that we've disconnected [!] }

end{ ID TCP SERVER EXECUTE }


Empfangen wird beim Client aber immer nur: '>>'

Ich hab schon ein wenig mit dem Quellcode herum gespielt, aber die Lösung habe ich nicht gefunden.

Hann mir vielleicht jemand behilflich sein?

Gruß
Nemesis

_________________
Wer nicht programmiert, der lebt nicht!