 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Ivor Flannery Guest
|
Posted: Thu Dec 22, 2005 1:03 am Post subject: Indy 10 Multicast Client |
|
|
I previously played around with a small project using multicast. Under
Indy 9 the read procedure used AData as a Tstream.
procedure TForm1.MCclientIPMCastRead(Sender: TObject;
AData: TStream; ABinding: TIdSocketHandle);
Under Indy 10, It is of a type TBytes. Does somebody have a couple of
lines of code on how to read the data delivered? How do you determine
the size of the received data buffer.
TIA
--
|
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Thu Dec 22, 2005 2:15 am Post subject: Re: Indy 10 Multicast Client |
|
|
"Ivor Flannery" <iflann01 (AT) 7-11 (DOT) com> wrote
| Quote: | Under Indy 10, It is of a type TBytes.
|
Actually, it is a TIdBytes. Delphi has a bug in it where the generated
event handler produces the wrong declaration.
| Quote: | Does somebody have a couple of lines of code on how to read the data
delivered? |
There are many BytesTo...() functions in the IdGlobal unit (BytesToString(),
BytesToInteger(), etc) for retreiving various data types from a TIdBytes.
| Quote: | How do you determine the size of the received data buffer.
|
TIdBytes is a dynamic array of bytes, so use Length(). Just like you would
to get the size of a string.
Gambit
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|