Autor Beitrag
Jan11
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 62



BeitragVerfasst: Mo 24.04.06 18:11 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
procedure CODE senden

begin
Tclientsocket.open; //wurde schon konfiguriert, verbindung ist da, alles ok
Tclientsocket.socket.sendtext('CODE');
end;


ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
procedure TForm1.ServerSocket1ClientRead

begin
if socket.Receivetext='CODE' then Form1.close;
end;


und das geht einfach nich. der code kommt an, auch in seiner richtigen form, aber der befehl wird einfach nich ausgeführt, gibts da irgendwas, was ich übersehen hab (anmerkung: im programm stehen da mehrere Codes und bedingungen, es sind 2 differenzierte programme)
Fighter#1
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 787

Win XP, Ubuntu 8.04
Turbo Delphi 2006, Delphi 2005 Pe, Delphi 5 Pe, Netbeans 6.1, Eclipse, Microsoft VisualC#, Dev C++, PHP, HTML, CSS
BeitragVerfasst: Mo 24.04.06 18:14 
Warum machst du nicht eine variable vom Typ TClientSocket?
Mach das mal.
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
klient:TClientsocket;
klient:=TClientSocket.Create;
klien.Port:=20;
klien.Host:='';
Klient.Open;
klien.Socket.SendText('CODE');
klient.Close;


Moderiert von user profile iconraziel: Delphi-Tags hinzugefügt

_________________
Wer andere beherrscht ist stark,
wer sich selbst beherrscht ist mächtig. Lao Tse
Marco D.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2750

Windows Vista
Delphi 7, Delphi 2005 PE, PHP 4 + 5 (Notepad++), Java (Eclipse), XML, XML Schema, ABAP, ABAP OO
BeitragVerfasst: Mo 24.04.06 18:14 
user profile iconJan11 hat folgendes geschrieben:
(anmerkung: im programm stehen da mehrere Codes und bedingungen, es sind 2 differenzierte programme)

Dann poste mal den Rest von ServerSocket1ClientRead.

_________________
Pascal keeps your hand tied. C gives you enough rope to hang yourself. C++ gives you enough rope to shoot yourself in the foot
Jan11 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 62



BeitragVerfasst: Mo 24.04.06 18:22 
tut mir leid jungs. wenn man das programm so macht, wie es da steht, dann geht es, hatte das geschrieben ohne es zu testen. dann muss der fehler irgendwo anders in meinem programm sein. tut mir leid dass ich eure zeit gestohlen hab, trotzdem danke, jan
Marco D.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2750

Windows Vista
Delphi 7, Delphi 2005 PE, PHP 4 + 5 (Notepad++), Java (Eclipse), XML, XML Schema, ABAP, ABAP OO
BeitragVerfasst: Mo 24.04.06 18:23 
*Meine Zeit zurückforder* :mrgreen:

_________________
Pascal keeps your hand tied. C gives you enough rope to hang yourself. C++ gives you enough rope to shoot yourself in the foot
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.04.06 20:13 
Moin!

user profile iconJan11 hat folgendes geschrieben:
ausblenden Delphi-Quelltext
1:
2:
Tclientsocket.open; //wurde schon konfiguriert, verbindung ist da, alles ok
Tclientsocket.socket.sendtext('CODE');

Sowas wie oben kann nicht funktonieren, da du nach einem .Open erstmal auf ein OnConnect-Ereignis warten mußt, bis du Daten senden darfst, sonst gibts was auf die Finger in Form einer Exception. ;)

Aber da du geschrieben hast, dass es bei dir keine Exception gibt (bzw. ein OnError-Ereignis), gehe ich mal davon aus, dass du nur eine "unglückliche Zusammenfassung" deines Codes angegeben hast. :)

Na dann viel Spaß noch,

cu
Narses

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