Autor Beitrag
juelin
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 40

Win XP, Linux
D7 K3
BeitragVerfasst: Mo 24.12.07 15:28 
hallo,

ich arbeite mit DELPHI 7.
Ich habe ein Clientprogramm IP:192.168.1.253 Port: 1212 PC 2
und ein Serverprogramm IP:192.168.1.254 Port: 1212 PC 1 geschrieben.
Die beiden Programme sollen miteinander kommuniziern und zwar asynchron.

Aber weder das Clientprogramm noch das Serverprogramm kommen jemals in
die Routine OnRead/OnClientRead obwohl der Client sendet.

Das Serverprogramm macht nur ein "ServerSocket1.Open;"
Das Clientprogramm macht "ClientSocket1.Open;" und "ClientSocket1.Socket.SendText('irgendwas');"

Hier die Logfiles:

Server:
Listen 2007-12-24 13:46:58
Get Socket 2007-12-24 13:47:37
Connect 2007-12-24 13:47:37
Open TCP 192.168.1.253
Accept 192.168

Client:
Lookup 2007-12-24 14:01:34
Connecting 2007-12-24 14:01:34
Connect 2007-12-24 14:01:50
Open TCP 192.168.1.254
Transmit 2007-12-24 14:01:50
Disconnect 2007-12-24 14:02:10
Close TCP 192.168.1.254

Was mache ich falsch?????
Am liebsten wäre mir ein Beispielprogramm.

Oder soll ich eine andere Komponete benutzen????

Danke und Gruss
Jürgen
Einloggen, um Attachments anzusehen!
Jerk
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 251

Vista Ultimate, Ubuntu
Turbo Delphi 2006
BeitragVerfasst: Mo 24.12.07 15:52 
kleiner tipp wenn du 15 felder in einem Array den gleichen wert zuweist kannst du das auch so machen:
ausblenden Delphi-Quelltext
1:
for i :=1 to 15 do array[i]:=''					

Du musst auch nich vor jede Variable ein var schreiben, das geht auch so:
ausblenden Delphi-Quelltext
1:
2:
3:
var
 a,b,c,d,e,f:Integer;
 g,h,j,k,l : String;


bei den ganzen Errorevent= dingern kann man auch case benutzen, das ganze auch bei den Mediaplayer teilen.
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
case Errorevent of
 eeGeneral:
  begin
  end;
 eeSend:
  begin
  end;
...
end;

Für nur eine Anweisung braucht man auch kein Begin
ausblenden Delphi-Quelltext
1:
if zeichen='a' then m:=1;					


Bei TForm.Nummer kannste auch einfach das machen:
ausblenden Delphi-Quelltext
1:
if (strtoint(zeichen) > -1and (strtoint(Zeichen) < 10then m:=1;					

Also ich blicke derzeit überhaupt nicht durch was da überhaupt passieren soll.
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Mo 24.12.07 20:58 
Moin!

user profile iconjuelin hat folgendes geschrieben:
Am liebsten wäre mir ein Beispielprogramm.
Dann schau mal hier, vielleicht kommst du damit weiter. ;)

cu
Narses

//EDIT: :oops: schon wieder den Branch gelinked... :autsch: :oops:

_________________
There are 10 types of people - those who understand binary and those who don´t.


Zuletzt bearbeitet von Narses am Di 25.12.07 01:01, insgesamt 1-mal bearbeitet
LorenzS
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 128

MS-DOS, WIN 7, WIN 10
BP7.0, D3, D5
BeitragVerfasst: Mo 24.12.07 22:42 
Narses wie ist das kennwort für deinen link?
jakobwenzel
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1889
Erhaltene Danke: 1

XP home, ubuntu
BDS 2006 Prof
BeitragVerfasst: Mo 24.12.07 22:46 
Schmeiß das branch raus, das ist nämlich ein Link aus dem Testforum.

www.delphi-library.d...lTutorial_54269.html

_________________
I thought what I'd do was, I'd pretend I was one of those deaf-mutes.