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 

TidUDPServer trying to receive records

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





PostPosted: Mon Oct 20, 2003 4:52 pm    Post subject: TidUDPServer trying to receive records Reply with quote




I am using Indy 9 with Delphi 5 and working with TidUDPServer trying to send records.

At the UDPServerUDPRead(Sender: TObject; AData: TStream;

ABinding: TIdSocketHandle); procedure I have trouble reading the recorded info that I get from AData: TStream.

What I do is the following:

AData.WriteBuffer(MyRec,SizeOf(MyRec));

But nothing..

I would like to copy the info from the AData: TStream into a MyRec: (MyRecord = Packed Record ....)



Thank you for your time!!.

Back to top
Martin James
Guest





PostPosted: Mon Oct 20, 2003 5:32 pm    Post subject: Re: TidUDPServer trying to receive records Reply with quote



Quote:
What I do is the following:

AData.WriteBuffer(MyRec,SizeOf(MyRec));

But nothing..

You have to read it. You are shoving extra records into the stream.

Adata.readBuffer(myRec,AData.size);

is my usual call.

Rgds,
Martin




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.