Autor Beitrag
Coder
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1383
Erhaltene Danke: 1

WinXP
D2005 PE
BeitragVerfasst: Do 06.07.06 21:16 
Hi
Ich hab folgendes Record.
ausblenden Delphi-Quelltext
1:
2:
3:
  TTest=record
  a: String[50];
  end;

Das versende ich in einem MemoryStream per TIdTCPClient.
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
  MStream:=TMemoryStream.Create;
  Client.Connect;
  Try
    MStream.Write(Test,SizeOf(TTest));
    Client.OpenWriteBuffer;
    Client.WriteStream(MStream,True,True);
    Client.CloseWriteBuffer;
  Finally
    Client.Disconnect;
    MStream.Free;
    end;

Das funktioniert. :D

Nun zu meiner Frage:
Wenn ich a nicht bis 50 Zeichen voll mache, werden dann trotzdem die restlichen Zeichen bis 50 gesendet?

MfG, Coder
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Do 06.07.06 23:29 
Moin!

user profile iconCoder hat folgendes geschrieben:
Wenn ich a nicht bis 50 Zeichen voll mache, werden dann trotzdem die restlichen Zeichen bis 50 gesendet?

Ja.

Und zum Thema [url=www.delphi-library.d...Objekten_60793.html]records versenden[/url]... ;)

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.
Coder Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1383
Erhaltene Danke: 1

WinXP
D2005 PE
BeitragVerfasst: Fr 07.07.06 01:08 
Danke!
Sehr schönes Tutorial.
Werd mich jetzt mit Protokollen befassen. :)

MfG, Coder