ďťż

Ładny brzuch

Witam mam problem z przesyłaniem tekstu (poprostu nie wiem jak :P)
Na socketach wysyłała się: ClientS.Socket.SendText('tekst');
A jak to wysłać za pomocą IdTCPClient1 (INDY)
Na socktach robiłem (serwer) :
if P = 'tekst' then begin coś tam
a jak to zrobić za pomocą IdTCPServer1 i IdThreadMgrDefault1 ??

a jeszcze jedno jak zrobić takie coś za pomocą IdTCPClient1 ?? :

procedure TForm1.SendMSG(MSGType, SepAr, MSGValue: String);
begin
ClientSocket1.Socket.SendText(MSGType + SepAr + MSGValue);
end;

Żebym mógł zrobić tak:

STR := TStringList.Create;
STR.Add(memo1.Text);
STR.Add(mamo2.Text);
SendMSG('tekst',#2,STR.Text);

i odebrać

P := Socket.ReceiveText;
if DecodeType(P) = 'tekst' then begin
Str := TStringList.Create;
Str.Text := RString(P,#2);
Label6.Caption := Str[0];
Label7.Caption := Str[1];
Str.Free;

  • zanotowane.pl
  • doc.pisz.pl
  • pdf.pisz.pl
  • zsf.htw.pl
  •