Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 867941
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T10:03:29+00:00 2026-05-15T10:03:29+00:00

I have situation where I have to handle multiple live UDP streams in the

  • 0

I have situation where I have to handle multiple live UDP streams in the server.

I have two options (as I think)

Single Socket :
1) Listen at single port on the server and receive the data from all clients on the same port and create threads for each client to process the data till the client stop sending.
Here only one port is used to receive the data and number of threads used to process the data.

Multiple Sockets :
2) Client will request open port from the server to send the data and the application will send the open port to the client and opens a new thread listening at the port to receive and process the data.Here for each client will have unique port to send the data.

I already implemented a way to know which packet is coming from which client in UDP.

I have 1000+ clients and 60KB data per second I am receiving.

Is there any performance issues using the above methods

or Is here any efficient way to handle this type of task in C ?

Thanks,

Raghu

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T10:03:30+00:00Added an answer on May 15, 2026 at 10:03 am

    With that many clients, having one thread per client is very inefficient since lots and lots of context switches must be performed.
    Also, the number of ports you can open per IP is limited (port is a 16 bit number).

    Therefore “Single Socket” will be far more efficient. But you can also use “Multipe Sokets” with just a single thread using the asynchronous API. If you can identify the client using the package’s payload, then there is no need to have a port per client.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here is my situation. I have a server application designed for multiple users to
I have been googling for hours looking for something to handle my situation. I
I am curious how others would handle this situation. I have a domain layer
I'm trying to figure out how to handle this situation. I have the following
I have a situation with my MVC2 app where I have multiple pages that
If I have situation like below, where I success. handle image upload and store
I have a situation where I have two arrays and I use one array(A)
Here's the situation: I have a website with a complex address form with multiple
Here's the situation: I have a web-based ticket application, multiple users. One problem that
We have a situation where we have multiple databases with identical schema, but different

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.