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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T23:18:41+00:00 2026-06-14T23:18:41+00:00

For a single threaded server, I have the code below. I am wondering, what

  • 0

For a single threaded server, I have the code below. I am wondering, what would happen if I receive a packet(and start processing it) and another packet arrives, while I am not listening (busy processing). Would the os buffer the packet and waits till the socket is listening again, or is the packet dropped?

            While(true){
                UDPsocket.receive(packetBuff);
                //Do stuff
            }

Note: The application is running on Linux(Ubuntu 12.04)

  • 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-14T23:18:42+00:00Added an answer on June 14, 2026 at 11:18 pm

    The operating system has a receive buffer where it can store data when your program is busy. You can use getsockopt() with the SO_RCVBUF option to see/change what the receive buffer size is, and SO_SNDBUF for the send buffer. There is usually a system-wide default, and a system-wide maximum size you can set for this.

    What the default is, and how to see that depends on which operating system you’re using. The default is usually somewhere between 32K and 256K of data that it will buffer for you.

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

Sidebar

Related Questions

How can I make an embedded Jetty instance single-threaded? I have tried server.setThreadPool(new QueuedThreadPool(1))
I have coded a single threaded client server model which does following: Server loops
Seeing as how node is single threaded, If I have node server running on
I have written a simple single threaded client server application in Visual C++ .
I have a single-threaded non-blocking socket IO server written in Java using nio. When
Is netty's udp running in single-threaded mode? I have configured the NioDatagramChannelFactory like below:
I have been building a multi threaded server, with each thread having a single
I have a single-threaded application that uses 3 SQLite databases in 3 different files
Usually in a single threaded application, the main managed object context would reside in
I have a single-threaded Rails app running on thin in single-threaded mode on Heroku

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.