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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:30:01+00:00 2026-06-17T09:30:01+00:00

I am writing a program using boost asio to receive multicase messages from around

  • 0

I am writing a program using boost asio to receive multicase messages from around 30 multicase ip in linux with c++. I am here to seek advances on how to minimize packet drop from my client side during runtime. I have already maximized the NIC receive buffer. I am using a 8 core cpu. I am also wondering will the NIC card create same number of buffer queue to equal to number of sockets in the program? Beside configure the NIC card, could I do something on the linux kernel? Since I believe kernel will do buffer copy from the NIC first before our program copy data from it, right?

template<typename msg, int id>
void data_service<msg, id>::on_rt_recv( char* p_raw_packet, int p_length, const boost::system::error_code& error )
{
    if (!error)
    {
        //post to strand and wait to proceed
        processing_strand_.post(boost::bind(&data_service::on_rt_recv_handler, this,
            p_raw_packet,
            p_length));

        //continue to listen as soon as possible
        auto new_buffer = get_new_buffer();
        rt_socket_[p_line]->async_receive_from(boost::asio::buffer(new_buffer, BUFFER_SIZE_), rt_endpoint_,
            boost::bind(&data_service::on_rt_recv, this,
            new_buffer,
            boost::asio::placeholders::bytes_transferred,
            boost::asio::placeholders::error));
    }
    else if (error != boost::asio::error::operation_aborted)
    {
        memory_pool_.free((void*)p_raw_packet);
    }
}
  • 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-06-17T09:30:02+00:00Added an answer on June 17, 2026 at 9:30 am

    Packet loss issue was caused by hardware, including switch, and NIC cards. the packet rate is actually 2500 * 70 /sec because there were 70 udp sockets. Highly recommend a network monitoring tool call Wireshark which provide load of information regarding to your current network traffic.

    Regarding to Demon solution, Boost asio under the hook use iocp in window, and epoll in unix.

    No buffer size need to adjust as well.

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

Sidebar

Related Questions

I'm writing a cross-platform server program in C++ using Boost.Asio. Following the HTTP Server
I am writing an application program using swing. I need to exit from the
I'm writing a program using gtkmm-2.4 GUI package in Linux. How can I set
I'm writing a program using the Managed WiFi API . Here's how I get
I'm writing a program using epoll_wait to wait for file descriptors on 64-bit Linux,
I'm writing a small C++ program using Boost's 'program_options' support. The following code: boost::program_options::options_description
I'm using a fairly simple boost::asio set-up, where I call io_service.run() from the main
Basically I am writing a simple program using the boost socket library... I have
I am writing a C++ program that uses Boost, using XCode 4.1 as IDE
I'm writing a program using gtkmm-2.4 GUI package in Linux. How can I put

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.