Autor Beitrag
O'rallY
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 563



BeitragVerfasst: So 09.02.03 12:03 
Ich suche nach einem Tutorial über die TCP/IP-Kompos von Indy. Auf www.delphi-source.de ist nur ein winziges Tutorial, leider nicht ausreichend!

_________________
.oO'rallY
Linux is like a tipi: No gates, no windows and a gnu-eating apache inside...
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: So 09.02.03 13:42 
bei den INDYs kann man sich zu den INDY kompos demos runterladen. von denen hab ich mir abgeschut wie man mmit denen umgeht !!

_________________
In the beginning was the word.
And the word was content-type: text/plain.
O'rallY Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 563



BeitragVerfasst: So 09.02.03 14:29 
Hmm, ja, die hab ich auch schon. Nur wäre eine deutsche Doku oder ein ausführliches Tutorial angenehmer, wenn du verstehst :mrgreen: . Außerdem zeigen die Demos nur bestimmte Einstatzgebiete, nicht alle.

_________________
.oO'rallY
Linux is like a tipi: No gates, no windows and a gnu-eating apache inside...
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: So 09.02.03 14:46 
sie zeigen dir wie du einen string an einen server schicks oder wie man komplette files oder recodrs rüberstreamt.

was bruachst du denn genau ??

_________________
In the beginning was the word.
And the word was content-type: text/plain.
O'rallY Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 563



BeitragVerfasst: So 09.02.03 15:23 
Naja, ich würde halt gern mehr über den Hintergrund erfahren. Wie genau die Kompo funktioniert. Ein Beispiel:

ausblenden volle Höhe 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:
procedure TForm1.Button1Click(Sender: TObject);
begin
   with IdTCPClient1 do begin
      Connect;      
      try
         Sleep(3000);
         ShowMessage(ReadLn);
         WriteLn('Greetings back1');
         ShowMessage(ReadLn);
         WriteLn('Greetings back1');
         ShowMessage(ReadLn);
         WriteLn('Greetings back1');
      finally
         Disconnect;
      end;
end;
end;

procedure TForm1.IdTCPServer1Execute(AThread: TIdPeerThread);
begin
   with AThread.Connection do
   begin
      WriteLn('Hello from Basic Indy Server server1.');
      ShowMessage(ReadLn);
      WriteLn('Hello from Basic Indy Server server2.');
      ShowMessage(ReadLn);
      WriteLn('Hello from Basic Indy Server server3.');
      ShowMessage(ReadLn);
      Disconnect;
   end;
end;


Wieso erhält der Client die Nachricht, obwohl ein Sleep eingebaut ist und wieso kann man einfach Empfangs- und Senderoutinen hintereinander schreiben und trotzdem Disconnected der Client nicht einfach wieder und alles kommt an der richtige Stelle an?
Wann genau wird das OnExecute-Event aufgerufen?

_________________
.oO'rallY
Linux is like a tipi: No gates, no windows and a gnu-eating apache inside...
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: So 09.02.03 17:00 
hmmmm.... gute frage. aber viellicht hilft es ja wenn du dir die TCP Protokoll spezifikation anschaust.... (viel spass)

das mit dem sleep kann sein, da der server ers schreibt wenn eine leseanfrage kommt

_________________
In the beginning was the word.
And the word was content-type: text/plain.