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 445311
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T21:21:28+00:00 2026-05-12T21:21:28+00:00

I have a simple C# application that uses UDP multicast in a single-receiver, single-sender

  • 0

I have a simple C# application that uses UDP multicast in a single-receiver, single-sender scenario. The goal is to get message delivery as fast as possible in a local network environment.

I have used SocketAsyncEventArgs/SendAsync/ReceiveAsync, BeginSend/BeginReceive, Threads/Send/Receive, and have tried both PGM and UDP multicast.

Each implementation attempt works OK for repeated message delivery up to around 1000 messages with local send, local receive. After that, the performance starts to drop exponentially. Where 1000 messages take a few hundredths of a second, 10,000 messages might take anywhere from 2-10 seconds.

Does anyone have experience in high-performance UDP/PGM multicasting? What is the best design to get maximum throughput?

Update

Right now, it’s just a single program running locally – 1 application with 1 sender and 1 receiver. The test messages are 4 bytes.

  • 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-12T21:21:28+00:00Added an answer on May 12, 2026 at 9:21 pm

    Try making your socket’s send or receive buffer (server or client) large enough to accommodate the amount of traffic you expect to deal with. Here is some sample C# code from my own UDP multicast server/client on the server side where dataSock is my Socket bound to the UDP multicast group:

    dataSock.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReceiveBuffer, (NumberOfPackets * PacketSize) + SmallEpsilonForExtraHeadroom);
    

    Also be sure and set SocketOptionName.SendBuffer on your client side to match the buffer size your server is producing.

    I would also recommend, if you were not already aware, to make your packet sizes less than the MTU. By default, MTUs are set to 1500 bytes. (MTU is maximum transmission unit size)

    You may still get dropped packets unless you also throttle your send rate, to make sure your clients can keep up. Your network hardware is most likely not the bottleneck here. See my question Need microsecond delay in .NET app for throttling UDP multicast transmission rate for an answer to that problem (using Stopwatch in a while-loop for delays on the order of microseconds).

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

Sidebar

Related Questions

I have a simple WPF application that uses ClickOnce to handle installing. Within this
I have a simple Android application that uses a JAR I have built. When
I have a simple test application (C# console application) that does an HTTP GET
I'm writing a simple application that uses sockets . I have an activity that
I have a very simple Win32 application that uses CAtlExeModuleT. The module simply creates
I have written a simple Android application that uses a sqlite database which is
I have a small application that uses a DrawingArea to draw a simple map
I have a fairly simple desktop application that uses a .NET setup project (.msi
I have a simple php application that uses, among others, an hourly updated external
I have a simple win32 application that uses the createProcess method to call Qt

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.