Autor Beitrag
bis11
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1247
Erhaltene Danke: 2

Apple Mac OSX 10.11

BeitragVerfasst: So 05.09.04 09:18 
Hallo Leutz,

ich habe ein Programm geschrieben, welches mir eine Datei vom Client zu einem Server überträgt mit den Indy-Komponenten. Ich nutze dazu die Komponenten TCPServer und TCPClient. Meine Frage ist, was passiert an dem Rechner der das Server Programm geladen hat, wenn zur gleichen Zeit mehrere Rechner drauf zu greifen ? Arbeitet dann das Server Programm alles gleichzeitig ab, was ja wieder eine Menge Resourcen braucht oder läuft das alles in irgendeinen Puffer und wird dann nach der Reihe abgearbeitet.
maxk
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1696
Erhaltene Danke: 1

Win XP, Debian Lenny
Delphi 6 Personal
BeitragVerfasst: So 05.09.04 09:46 
Die Indys arbeiten mit Threads, d.h. es werden alle Verbindungen gleichzeitig bearbeitet.

_________________
Ein Computer wird das tun, was Du programmierst - nicht das, was Du willst.
bis11 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1247
Erhaltene Danke: 2

Apple Mac OSX 10.11

BeitragVerfasst: So 05.09.04 10:12 
Verstehe ich das richtig ? Jede einzelne Anfrage die an das Server Programm geliefert wird hat einen einzelnen Thread.
maxk
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1696
Erhaltene Danke: 1

Win XP, Debian Lenny
Delphi 6 Personal
BeitragVerfasst: So 05.09.04 10:37 
Jein, jeder Client kriegt einen eigenen Thread. Wenn ein Client aber nun 2 Anfragen sendet, werden diese nacheinander bearbeitet. Wenn zwei Clients je 2 Anfragen senden, werden beide ersten Anfragen zuerst (gleichzeitig) bearbeitet dann die beiden zweiten, wieder gleichzeitig. Eigentlich logisch :wink:

_________________
Ein Computer wird das tun, was Du programmierst - nicht das, was Du willst.
bis11 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1247
Erhaltene Danke: 2

Apple Mac OSX 10.11

BeitragVerfasst: So 05.09.04 10:57 
Alles klar, jetzt hat es klick gemacht. Ich danke Dir für Deine Hilfe.
Udontknow
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2596

Win7
D2006 WIN32, .NET (C#)
BeitragVerfasst: So 05.09.04 11:00 
Hallo!

Falls du dir keinen Kopf um die Synchronisation auf Serverseite machen willst, kannst du dir ja mal die Unit Suche in: Delphi-Forum, Delphi-Library "SIMPLETCP" in der "Open Source Units"-Sparte angucken.

Cu,
Udontknow
bis11 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1247
Erhaltene Danke: 2

Apple Mac OSX 10.11

BeitragVerfasst: So 05.09.04 11:22 
Danke für den Hinweis, die habe ich auch ausprobiert, aber das Beispiel von den Indy's habe ich eher umsetzen können.