BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Indy 10 Multicast Client

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet Winsock
View previous topic :: View next topic  
Author Message
Ivor Flannery
Guest





PostPosted: Thu Dec 22, 2005 1:03 am    Post subject: Indy 10 Multicast Client Reply with quote



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





PostPosted: Thu Dec 22, 2005 2:15 am    Post subject: Re: Indy 10 Multicast Client Reply with quote




"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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet Winsock All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.