Article View: borland.public.cppbuilder.internet.socket
Article #1164Re: UDP socket
From: Kresten Tolstrup
Date: Thu, 12 Apr 2007 11:04
Date: Thu, 12 Apr 2007 11:04
34 lines
2153 bytes
2153 bytes
Hi OK, I use the server as client to, the event OnUDPRead is then called when a UDP packet is received, and I can get the data from the Tstream, but how can I get the size, if I use the function AData->GetSize(), then I get the error "not accessible". Kresten "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> wrote: > >"Kresten Tolstrup" <kt@danphone.com> wrote in message >news:461b577e$1@newsgroups.borland.com... > >> I have now used the Indy components, and it is working, but >> isn't there any callback function in the client class, like the >> IdUDPServerUDPRead function in the server class > >No, there is not. But you can use TIdUDPServer for both a client and >a server, as it has all of the same writing methods that TIdUDPClient >has. The only difference between TIdUDPClient and TIdUDPServer is >that the former exposes Host and Port properties, which you don't >really need, and the latter allows listening on multiple local IP/Port >pairs, which you only need 1 of on the client side. Otherwise, they >are both the same, as they both derive from TIdUDPBase, which >implements most of the work equally between them. > >> do I have to poll the client class to see if it has received >anything? > >Yes, you would. > > >Gambit > >
Technical Details
Message-ID:
<461e0413$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<4609120b$1@newsgroups.borland.com> <460c3411$1@newsgroups.borland.com> <461b577e$1@newsgroups.borland.com> <461bc332$2@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,eda79d322010114f X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Kresten Tolstrup" <kt@danphone.com> Sender: "Kresten Tolstrup" <kt@danphone.com> Reply-To: "Kresten Tolstrup" <kt@danphone.com> Subject: Re: UDP socket Newsgroups: borland.public.cppbuilder.internet.socket X-User-Info: 80.196.23.205 References: <4609120b$1@newsgroups.borland.com> <460c3411$1@newsgroups.borland.com> <461b577e$1@newsgroups.borland.com> <461bc332$2@newsgroups.borland.com> NNTP-Posting-Host: 207.105.83.66 Message-ID: <461e0413$1@newsgroups.borland.com> Date: 12 Apr 2007 03:04:03 -0800 X-Trace: newsgroups.borland.com 1176372243 207.105.83.66 (12 Apr 2007 03:04:03 -0800) Lines: 35 Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail