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:"Remy Lebeau (TeamB)" (no.spam@no.spam.com)
Date:Thu, 27 Apr 2006 01:00:49

"John Doe" <john.doe@acme.com> wrote in message
news:bhm052ti9eaiulrs2qgj8g3l1nk6rtnd9n@4ax.com...

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

I guess you haven't look at the Indy documentation yet, have you?

> Still nothing in NetCat, but maybe either NetCat doesn't pick up
> broadcasts (only unicasts)

Have you tried using a packet sniffer to verify that the data is reaching
the machine at all?  Also, are there any routers on the network between your
machine and the NetCat machine?  Most network routers do not allow UDP
broadcasts to pass through by default.

> or it's just not possible to have the server receive a brodcast from
> a client running on the same host

Yes, it is.  My guess would be that NetCat is not listening on the same
network that the client is broadcasting to.

>   IdUDPClient1.Port := UDPDefaultPort;
>   IdUDPClient1.Active := true;
>   IdUDPClient1.BroadcastEnabled := True;

Get rid of all of that.  You don't need it at all.  Setting a UDP client
component to Active is useless since UDP is a connection-less transport to
begin with, and Broadcast() already handles both the Port and
BroadcastEnabled settings internally for you.


Stop

Replies:

none

In response to:

www.cryer.info
Managed Newsgroup Archive