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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T14:31:52+00:00 2026-06-01T14:31:52+00:00

From what i’ve read around about winsock, recv has a tendency to not receive

  • 0

From what i’ve read around about winsock, recv has a tendency to not receive all the data from a sender in a single call. When people say this do they mean, for example, i send 300 bytes from a client and i call recv on the server, it’s possible that it could only receive 200 some bytes on it’s first call and the buffer will be filled with those 200 bytes? What happens to the last 100 bytes?

also, let’s say a buffer is too small, like 512 bytes or something and the client sends 600. will the first recv call fill the buffer to capacity, and then just drop the last 88 bytes? if i call recv again with a different buffer, will the first 88 bytes of that buffer be the rest of the data?

and thirdly, if one and two are true, and i receive a whole packet of data in separate buffers, will i have to splice them together into one buffer to start parsing my data out of it?

  • 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-01T14:31:53+00:00Added an answer on June 1, 2026 at 2:31 pm

    I’m assuming TCP here.

    is it possible that it could only receive 200 some bytes on it’s first call and the buffer will be filled with those 200 bytes?

    Yes.

    What happens to the last 100 bytes?

    You’ll receive them next time.

    also, let’s say a buffer is too small, like 512 bytes or something and the client sends 600. will the first recv call fill the buffer to capacity, and then just drop the last 88 bytes?

    No.

    if i call recv again with a different buffer, will the first 88 bytes be the rest of the data?

    Yes.

    and thirdly, if one and two are true, and i receive a whole packet of data in separate buffers, will i have to splice them together into one buffer to start parsing my data out of it?

    That’s up to you. Do you need the data in one contiguous buffer? If so, yes.

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

Sidebar

Related Questions

From the Scala API , I got the following example, which does not compile;
From the paper of bigtable. bigtable I read this: Each METADATA row stores approximately
From here: https://stackoverflow.com/a/2485177/462608 For thread-safe accesses to shared data, we need a guarantee that
From an alphanumeric string I need to pick all two digit numbers. e.g.: input
From http://www.parashift.com/c++-faq-lite/basics-of-inheritance.html#faq-19.5 A member (either data member or member function) declared in a protected
I have a text area in my form which accepts all possible characters from
From my SQLite database i pulled all of the entries that have Liquor in
From what I've read, the iPhone 5 will use a new architecture, armv7s .
From the Writing R Extensions Manual , I read that As from R 2.14.0
From what I've read, VS 2008 SP1 and Team Foundation Server SP1 packages are

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.