What’s the difference between async_read and async_receive?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
async_receiveis a function that just receives into a buffer, but may not receive the amount you asked for. (It’ll be equal or less, never more.)async_read, however, will always receive the amount you asked for, as it states:The only thing the page is a bit vague on is what
async_readdoes if it doesn’t get that many bytes, and the connection closes gracefully. (Does that count as “error”?) This can probably be determined with a quick test. (async_receive, however, would just give you what it got.)