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

  • Home
  • SEARCH
  • 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 3400406
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T04:53:20+00:00 2026-05-18T04:53:20+00:00

Linux. I have an ethernet cable between two computers. A simple server-client program in

  • 0

Linux.

I have an ethernet cable between two computers. A simple server-client program in C to transfer a file from client to server. Client reads 100 bytes of data from the file and sends it to the server, and then waits for 2 seconds before sending the next packet.

When the client was sending the data, I pulled out the ethernet cable of the server side, I was expecting some error from the client since the connection is broke. But the client kept on writing the data to the pipe, and the server did not receive anything(but still it is waiting to receive).Client sent the whole file and stopped. Now, again I connect the ethernet cable, the server receives all the data sent by the client. How is this possible? Are the packets stored in some buffer and sent again when the connection is up?

Sorry for making it too long.

  • 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-18T04:53:21+00:00Added an answer on May 18, 2026 at 4:53 am

    The whole point of TCP is to provide reliable data transfer despite having an unreliable network underneath. Basically, the way it works is TCP only considers data sent after it receives an acknowledgement packet from the remote machine; until then, the kernel stores the data locally. The amount of time it’ll be buffered for can be quite long, depending on a bunch of settings in /proc as well as measured network parameters.

    edit: An app can check the size of the outstanding send queue by using the SIOCOUTQ ioctl; see the tcp(7) manpage. The same manpage discusses error handling as well.

    If you want that data to be lost instead of buffered, use UDP.

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

Sidebar

Related Questions

I'm new to Linux and have inherited keeping our single linux server running. It's
I have a Linux web server farm with about 5 web servers, web traffic
We have a Linux server application that is comprised of a number of open-source
I have a Linux server with multiple ips (so, multiple eth0, eth0:0, eth0:1 etc).
I have a Linux web server and I'd like to make some database tables
I am a beginner in using Linux, I have an input file with content
gcc 4.5.1 Fedora 14 Linux I have this static library that was build from
Is there a way to have Linux read ahead when cloning a disk? I
How do Window's programmers profile their native C++ code? On Unix/Linux you have gprof
I have 3 Linux machines, and want some way to keep the dotfiles in

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.