UDP server streaming content to multiple clients in C

  • Thread starter Thread starter guest1234
  • Start date Start date
  • Tags Tags
    Server
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 3K views
guest1234
Messages
38
Reaction score
1
Hi all

I'm trying to create a server that uses UDP and is capable of handling multiple clients. The server should 'stream' content to the clients only on the initial request (i.e. when starting the client). The general idea is to test how many clients is the server able to 'serve' before the packet loss exceeds 1%.

I've implemented simple echo-server: it sends data to the clients only if the latter requests to do so. However it's not what I want -- too much overhead is wasted on requesting new packages. Custom handshake with the server is achievable (although one must consider special cases where so-called ACK messages (still on UDP!) arrive too late) but disconnecting the server gets nastier.

Should there be some kind of bus between the server and clients, which signals the server to start streaming content to new clients and stops when client deattaches the 'session'?

Also, does a media streaming server send data to the client only if the latter requests?

Any pointers/tip appreciated.
 
Last edited:
Physics news on Phys.org
Is using C and/or UDP a must?