Article View: borland.public.cppbuilder.internet.socket
Article #4384indy udp client
From: Jonathan Benedicto
Date: Fri, 18 Feb 2005 23:42
Date: Fri, 18 Feb 2005 23:42
23 lines
1609 bytes
1609 bytes
I'm still learning how to use Indy. I've been very happy with them so far.
Anyway, I am sending data over a udp connection from a client to server and
vice versa. This data is arranged so that the first 4 bytes are the size of
the data and the rest is the actual size of the data.
Now, if I read the data like this :
int DataSize;
if(UdpClient1->ReadBuffer(&DataSize, sizeof(int)) == sizeof(int)){
char* Buffer = new char[DataSize];
if(UdpClient1->ReadBuffer(Buffer, DataSize) == DataSize){
// process data here.
}
delete[] Buffer;
}
Will it work successfully ?
--
Jonathan
Technical Details
Message-ID:
<42167d5a@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!gatel-ffm!gatel-ffm!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 11508e,fcf9c472009cf7a2,start X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Jonathan Benedicto" <incorrect@no.server> Newsgroups: borland.public.cppbuilder.internet.socket Subject: indy udp client Date: Fri, 18 Feb 2005 18:42:21 -0500 Lines: 25 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2527 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 X-RFC2646: Format=Flowed; Original NNTP-Posting-Host: 69.158.106.106 Message-ID: <42167d5a@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1108770138 69.158.106.106 (18 Feb 2005 15:42:18 -0800) Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!gatel-ffm!gatel-ffm!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail