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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T08:26:46+00:00 2026-06-12T08:26:46+00:00

If TCP socket is set to non-blocking mode and a socket send buffer is

  • 0

If TCP socket is set to non-blocking mode and a socket send buffer is set initially,
then send is used in a loop to send all the data. If send fails due to EAGAIN error, can the send-socket buffer be increased?
I am using Linux OS. I wanted to understand whether resizing of sendbuffer size is allowed or not. On tcp man page, “On individual connections, the socket buffer size must be set prior to the listen(2) or connect(2) calls in order to have it take effect.” Thats why the question arised

  • 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-12T08:26:47+00:00Added an answer on June 12, 2026 at 8:26 am

    That would be an implementation detail of the in-kernel network stack, i.e. of the operating system you run on (which you don’t state). I believe you can do this on most modern OS-es since it’s just a number limiting memory dedicated to a given socket, but it’s an entirely wrong way of approaching the problem because:

    • You cannot increase send buffer size indefinitely, the OS will cap it at some point.
    • TCP provides you with flow control – slow receiver slows down fast sender – and that’s an advantage of TCP related to its reliability, so if the receiver does not consume data fast enough, shoving more data into the kernel memory does not improve the situation in any way.
    • You are just being lazy and want the kernel do all the buffering for you.

    Figure out your traffic burst memory requirements, pre-set socket send buffer sizes, buffer on the application side.

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

Sidebar

Related Questions

I'm trying to lower the send buffer size on my non-blocking TCP socket so
When using a blocking TCP socket, I don't have to specify a buffer size.
I've got a TCP socket which reads data. When an error occurs when reading
I'm trying perform a relatively basic TCP socket send/receive operation on Windows CE using
I am trying to use non-blocking TCP sockets. The problem is that they are
I've been trying to make a non-blocking TCP server of sorts using tcp::acceptor. I've
From what I know, a blocking receive on a TCP socket does not always
I want to be able to set the TCP socket KEEPALIVE parameters (TCP_KEEPIDLE, TCP_KEEPINTVL,
Since I create a TCP socket,it is fine when sending small amount data.no fragment.
I am looking for an optimum sleep value to receive data from a non-blocking

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.