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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T12:34:01+00:00 2026-05-26T12:34:01+00:00

It is written in the documentation : This function is used to asynchronously read

  • 0

It is written in the documentation:

This function is used to asynchronously read data from the stream
socket. The function call always returns immediately.

I know it is asynchronous, so it returns immediately. But what does async_read_some() differ from free function read()? When I try to std::cout my buffer used for async_read_some(), it seems that the function reads many times until the stream is out of data.

Does this mean async_read_some() request continuously until it receives every data, for example, in a HTTP GET request? And the server will write little at a time and send a little to the client (for async_read_some() to read a little bit of whole data), or it dumps all data to the client at once?

  • 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-26T12:34:02+00:00Added an answer on May 26, 2026 at 12:34 pm

    No, async_read_some() does not request continuously.

    The ip::tcp::socket::async_read_some() function will make a system call that starts the read.

    After that, the next time you call io_service::run() on the io_service that you passed to the constructor of the ip::tcp::socket, the io_service will check to see if the async_read_some() has read any data.

    If data has been read, then it will call the ReadHandler callback that you passed to async_read_some().

    If data has not yet been read, it will return and check for completion again the next time you call io_service::run().

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

Sidebar

Related Questions

This is an embarrassing question, but even the well-written documentation provided with boost.interprocess hasn't
I written a query in my sql like this: select * from table_name order
Just a quick question to confirm the documentation: The getY(int) function from MotionEvent in
I've written this documentation of a rather simple class, but I feel it's not
I have some documentation written in OpenOffice, and I would like to include some
I have a COM SDK written in C++ and I'd like to create documentation
I written an asm function in Delphi 7 but it transforms my code to
I've written this small test class just to illustrate my problem When working with
I have a dll which comes from a third party, which was written in
I'm trying to use a Python library written in C that has no documentation

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.