Newsgroups : Borland : borland.public.delphi.internet.winsock : 2008 Jan : Re: UDP Multicast ?

www.cryer.info
Managed Newsgroup Archive

Re: UDP Multicast ?

Subject:Re: UDP Multicast ?
Posted by:"Jamie Dale" (jamie.da..@yahoo.com)
Date:Wed, 16 Jan 2008 22:06:51

For 20-40 clients I think it would probably be better to stick with TCP
instead of UDP.

Theoretically UDP on a private network should be pretty safe, and yes there
is less overhead as UDP doesn't have a direct connection with all the
clients and thus doesnt loop through all to broadcast the message.

TCP will be more resource hungry as you will need to loop through your
client list and send the data to each client individually. If one client has
disconnected, frozen etc, it could raise an error of some sort which you
would need to handle (so i would suggest experimenting with the error side
of things if you use TCP)

Anymore than 50 clients and you might want to consider using multiple
threads to send the message to the clients.
"Daniel Mauric" <danny at neobee dot net> wrote in message
news:4785f502@newsgroups.borland.com...
>I have the following situation:
>
> Local network environment with a single server that frequently sends
> messages to all clients. Same message to all clients. There are about
> 20-40 clients. Messages are of various length, up to about 1000 bytes, but
> an average of about 200 bytes, and occur about once per second. I was
> thinking of implementing this using UDP multicast. Would that be more
> efficient that TCP? Also would it generate less network traffic ?
>
> Also I need clients to send messages to a group of clients. Destination
> clients are predefined so they could join a  multicast group.
>
> In theory UDP is not guaranteed to deliver, but I understand that in
> reality in a local network of adequate bandwidth it is 100% safe. Is that
> correct ?
>
> Any suggestions are welcome.
>
> Regards,
> Danny

Replies:

In response to:

www.cryer.info
Managed Newsgroup Archive