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 

Using Indy 10 Multicast server to send TmemoryStream

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





PostPosted: Mon Feb 27, 2006 3:03 pm    Post subject: Using Indy 10 Multicast server to send TmemoryStream Reply with quote



Hi

The Indy TCP Multicast server's send method says it expects a 'const aBuffer:Tbytes' or 'const aData:string'.

I have been led to believe its possible to send a TBitMap image using TCP Multicast but how would I use this components to do it? Is there another method that I'm unaware of or do I convert the image into a TBytes variable, and if so how?

Many thanks for any help given
D
Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Mon Feb 27, 2006 11:03 pm    Post subject: Re: Using Indy 10 Multicast server to send TmemoryStream Reply with quote



"dave" <deepthinker (AT) btinternet (DOT) com> wrote in message
news:4403063b$1 (AT) newsgroups (DOT) borland.com...

Quote:
The Indy TCP Multicast server's send method says it expects a 'const
aBuffer:Tbytes' or 'const aData:string'.


That is almost correct. The Multicasting components have not been updated
yet to use the TIdBytes type. The overloaded version of Send() that takes a
buffer accepts a raw memory address, which makes things a little easier.
See below.

Quote:
I have been led to believe its possible to send a TBitMap image using
TCP Multicast but how would I use this components to do it?

Store the bitmap into a memory stream and then send the contents of the
stream, ie:

var
MStream: TMemoryStream;
begin
MStream := TMemoryStream;
try
Bitmap.SaveToStream(MStream);
...Send(MStream.Memory, MStream.Size);
finally
MStream.Free;
end;
end;


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.