Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Apr : Re: [D7] Broadcasting with UDP?

www.cryer.info
Managed Newsgroup Archive

Re: [D7] Broadcasting with UDP?

Subject:Re: [D7] Broadcasting with UDP?
Posted by:"John Doe" (john.d..@acme.com)
Date:Thu, 27 Apr 2006 07:45:43

On Wed, 26 Apr 2006 22:18:04 -0700, "Remy Lebeau \(TeamB\)"
<no.spam@no.spam.com> wrote:
>Any particular reason why you are not using the Broadcast() method?

Simple: I didn't know it even existed, and the examples I found via
Google all used the lenghty code I pasted before  :-)

Still nothing in NetCat, but maybe either NetCat doesn't pick up
broadcasts (only unicasts), or it's just not possible to have the
server receive a brodcast from a client running on the same host, and
the NIC is connected to an ADSL modem...

Unless someone knows why the code doesn't work, I'll grab a second PC
to run this test.

begin
  IdUDPClient1.Port := UDPDefaultPort;
  IdUDPClient1.Active := true;
  IdUDPClient1.BroadcastEnabled := True;
  IdUDPClient1.Broadcast('HELLO'#13#10, UDPDefaultPort);
end;

Thank you.

Replies:

In response to:

www.cryer.info
Managed Newsgroup Archive