Autor Beitrag
adler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 511

Windows XP
Delphi 05 Pers
BeitragVerfasst: Do 15.04.04 10:18 
Hi!

Ich versuche auf ein VB Prog (von meinem bruder) zu connecten, klappt auch...
Was nicht funzt, ist das es nach dem Senden sich aufhängt...
Er bekommt aber die werte. Folgenden Code habe ich dafür:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
procedure TForm1.Button1Click(Sender: TObject);
begin
tcpc.Connect();
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
tcpc.Disconnect;
end;

procedure TForm1.Button3Click(Sender: TObject);
begin
tcpc.SendCmd(edit1.text)
end;


Mehr brauche ich ja für sowas primitives nicht oder?
Also nach dem Senden "keine Rückmeldung"

_________________
Wo's nix zu gucken gibt, gibts vielleicht was zu hören.
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Do 15.04.04 19:41 
probier mal mit dem indy demo auf das VB proggi zu connected. wenn das geht dann nimm die routinen dafür her.
ich mach das immer mit writeln.

_________________
In the beginning was the word.
And the word was content-type: text/plain.
adler Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 511

Windows XP
Delphi 05 Pers
BeitragVerfasst: Do 15.04.04 20:23 
Habe ich probiert, damit kann ich nichtmal connecten,
mit meinem Kann ich Connecten und Senden, der String kommt im VB proggi an
und mein Delphi Proggi "erhängt" sich ^^

_________________
Wo's nix zu gucken gibt, gibts vielleicht was zu hören.
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Do 15.04.04 20:27 
sicher dass es sich erhängt oder dass es nur auf ne antowrt wartet ?? setzt mal den timeout paramter runter ! so auf 2000 !

_________________
In the beginning was the word.
And the word was content-type: text/plain.
adler Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 511

Windows XP
Delphi 05 Pers
BeitragVerfasst: Do 15.04.04 21:07 
Ich hatte keinen Timeout angegeben...
Ich wusste nicht ob ich ne Antwort brauche... brauche ich denn eine?

Naja, ich probiers morgen nochmal, wenn mein Bruder Zeit hat ;)
Aber falls du mir sagen kannst, ob er nochwas zurückschicken muss, wäre das auch cool.
Normaler weiße sollte das ja aber doch automatisch gehen?!

_________________
Wo's nix zu gucken gibt, gibts vielleicht was zu hören.
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Fr 16.04.04 09:46 
hmm ich weiss nicht, ob indy immer drauf wartet, dass ne bestätigung kommt dass es angekommen ist. das könnte bei dem sendCMD befehl druch aus so ein. setzt den timeout einfach mal. denn 0 bedeutet für INDY unendlich, d.h. das programm friert sich ein.


//edit:
ich hab mal in der INDY Hilfe nachgeschaut:
Zitat:
function SendCmd(const AOut: string; const AResponse: SmallInt): SmallInt; overload;
function SendCmd(const AOut: string; const AResponse: Array of SmallInt): SmallInt; virtual; overload;

Parameters

const AOut: string

Command to be sent to the server.

const AResponse: Array of SmallInt

Numeric response expected. Default is -1. (Array of SmallInt for multiple responses allowed).
häng mal hinten noch ne -1 dran.

_________________
In the beginning was the word.
And the word was content-type: text/plain.
adler Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 511

Windows XP
Delphi 05 Pers
BeitragVerfasst: Fr 16.04.04 10:35 
Folgender maßen bin ich verblieben:
EDIT:
Sorry, hab den Server benutzt ... :D
Aber irgendwie bekomm ichs mitem client auch net hin

_________________
Wo's nix zu gucken gibt, gibts vielleicht was zu hören.
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Fr 16.04.04 11:49 
beschreib doch mal genauer was mit dem client nicht funzt und welche fehler kommen.
hast du dir die indy demos mal angeschaut ?? da wird super gezeigt wie man das macht

_________________
In the beginning was the word.
And the word was content-type: text/plain.
adler Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 511

Windows XP
Delphi 05 Pers
BeitragVerfasst: Fr 16.04.04 12:24 
Nein, also ja...
Naja, ich habe mir das schon angeschaut... Aber der Client konnte nichtmalConnecten(der von Indy)
Bei mir geht das jetzt!
Und jetzt will ich keinen "CommBlock" empfangen, nur einen String, mehr nicht.
Geht das denn so? Nur nen String empfangen? Muss ja :D

_________________
Wo's nix zu gucken gibt, gibts vielleicht was zu hören.
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Fr 16.04.04 13:24 
mit dem client ?? klar geht das. du kannst das was der server zurückgibt per readln auslesen !

_________________
In the beginning was the word.
And the word was content-type: text/plain.
adler Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 511

Windows XP
Delphi 05 Pers
BeitragVerfasst: Fr 16.04.04 14:23 
Ja aber bei welchem Event? WorkEnd? ich probiers mal, danke!

_________________
Wo's nix zu gucken gibt, gibts vielleicht was zu hören.
adler Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 511

Windows XP
Delphi 05 Pers
BeitragVerfasst: Fr 16.04.04 14:45 
Also, habs mit jedem Status versucht, da kommt nichts...
Dann im Beispiel, wird ja auch kein Status gebraucht... da hab ichs halt mal mit Copy und Past probiert, ob das geht.
Also diese Klasse da und die Procedure... kommt auch nichts.
Ich bräuchte mal von euch ein Reines Empfangsbeispiel pls :-/

_________________
Wo's nix zu gucken gibt, gibts vielleicht was zu hören.
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Fr 16.04.04 16:40 
was sollt ihr denn genau machen und was macht denn das VB Proggi von deinem Bruder. das kommt mir alles sehr verworren vor was ihr das macht !!

_________________
In the beginning was the word.
And the word was content-type: text/plain.
adler Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 511

Windows XP
Delphi 05 Pers
BeitragVerfasst: Fr 16.04.04 17:13 
Ahja, ich soll ne OpenGL Anwednung schreiben, das bestimmte sachen macht, wenn er bestimmte Befehle schickt.
Er schickt nen String und ich werte ihn aus, sozusagen schreibe ich ein kleines Spielchen(er ist Feuerwehr besessen *g*)
Da er kein Delphi kann und ich zum ersten mal das idTCP ernsthaft versuche zu nutzen klappt das noch nicht.
Er hat da einige Leute mit denen er Funkübungen macht, dafür wollen die ein Proggi wo man die Posi eines Fahrzeuges sehen kann.
So einfach ;)
Also, empfangen kann er jetzt meinen String ohne Probs... aber ich kann das nicht...

_________________
Wo's nix zu gucken gibt, gibts vielleicht was zu hören.
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Fr 16.04.04 18:39 
Also wenn er nen string schicken soll und du dann scahen machst. dann brauchst du den INDY TCP Server und er muss nen client haben, der die Befehle schickt.
Ich kann dir nur wieder nahelegen dir die indy demos anzuschauen.

_________________
In the beginning was the word.
And the word was content-type: text/plain.
adler Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 511

Windows XP
Delphi 05 Pers
BeitragVerfasst: Fr 16.04.04 18:52 
Nein ich schicke ihm UND er schickt mir...
Also braucht eine Seite nen Client und eine nen Server (wobei er nur eine Kompo hat die beides unterstützt)

_________________
Wo's nix zu gucken gibt, gibts vielleicht was zu hören.
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Sa 17.04.04 09:54 
du brauchst aber auch beides, wenn du empfangen willst ohne vorher was gesendet zu haben !!!

_________________
In the beginning was the word.
And the word was content-type: text/plain.
adler Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 511

Windows XP
Delphi 05 Pers
BeitragVerfasst: Sa 17.04.04 11:31 
Also kann ich nur mit der Server Kompo empfangen?
Ok, dann muss ich aber bei der ServerDemo gucken ;)

_________________
Wo's nix zu gucken gibt, gibts vielleicht was zu hören.
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Sa 17.04.04 11:35 
jo so isses. um zu senden brauchst du nen client um zu empfangen nen server. (mal einfach ausgedrückt)

_________________
In the beginning was the word.
And the word was content-type: text/plain.
adler Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 511

Windows XP
Delphi 05 Pers
BeitragVerfasst: Sa 01.05.04 15:11 
Habe jetzt empfangen können...
Aber das ist doch Schwachsinn, dann bräuchte ich 2 Verbindungen?!
Einmal fürn Client und einmal fürn Server?!

_________________
Wo's nix zu gucken gibt, gibts vielleicht was zu hören.