Server TCP Broadcast/Multicast to Clients? [C#/CS 2005]

Started by
12 comments, last by intrest86 17 years, 4 months ago
I'm assuming the problem is when more than two points are talking to each other -- leading to potentially n-squared bandwidth growth.

If this is a school project, then either use UDP broadcast and don't worry about routing, use a client/server approach, or use one connection per client and don't worry about the n-squared bandwidth. Video is small potatoes these days -- a QCIF image at 10 fps will take less than 200 kbps with a good codec.

If this is for an in-house business application, then I suggest using video gateways, where each client talks to the local gateway, and the gateways talk to each other. Typically, you'll have one gateway per subnet. Or go client/server there, too.

If this is for a commercial application, I suggest using the client/server approach, and having the server combine all the data needed for all streams to each individual recipient. For the home user, this will be optimal; for businesses with multiple participants, you could sell as an upgrade a gateway that could talk to the server, to reduce internet downlink usage.

enum Bool { True, False, FileNotFound };
Advertisement
Yes, it's a school project, but it's my diploma project :P . I realy like the ideea of a client/gateway implementation. Do you know any generic code for a gateway implementation? I prefer to use a connection oriented protocol.
Quote:Original post by Shaitan00
1- Foreach Client the main form launches (create and start) a thread per client (so many threads), each thread performs the tcpclient connection, sends the data, and then close.
2- Main thread launches a single thread (create and start) which will loop through the list of clients (tcpclient connection, send data, close) and send the data


Not sure what you are trying to do exactly but you should keep the connection open as long you are communicating with a certain client. Closing the connection after each send then reopening it is very wasteful. (three way hand shake and all)
Basically what you want to do is "Group Communication". There are some toolkits out there that help do these kinds of things. One that one of my professors helped make and really promotes is Spread (spread.org). Your clients use the spread program to join a "group", and then you can send messages to a group and everyone will be sent the message. You can choose what level of service you need (Reliable, FIFO, Agreed, etc..), and it sounds like it would do the job for you.
Turring Machines are better than C++ any day ^_~

This topic is closed to new replies.

Advertisement