From 6531a3c6d3ed3d6f35b94c264ed94458b797f65f Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Thu, 15 Jun 2017 06:41:57 -0700 Subject: [PATCH] Specification for http read --- CHANGELOG.md | 1 + include/beast/http/read.hpp | 13 ++++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index de4f4969..0f953191 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ Version 58: * Fix unaligned reads in utf8-checker * Qualify size_t in message template * Reorganize examples +* Specification for http read -------------------------------------------------------------------------------- diff --git a/include/beast/http/read.hpp b/include/beast/http/read.hpp index e79f19f8..95c479d6 100644 --- a/include/beast/http/read.hpp +++ b/include/beast/http/read.hpp @@ -604,7 +604,9 @@ async_read( dynamic buffer's input sequence will be given to the parser first. - @param msg An object to be overwritten with the message contents. + @param msg An object in which to store the message contents. + This object should not have previous contents, otherwise + the behavior is undefined. The type must be @b MoveAssignable and @b MoveConstructible. @throws system_error Thrown on failure. @@ -654,7 +656,9 @@ read( dynamic buffer's input sequence will be given to the parser first. - @param msg An object to be overwritten with the message contents. + @param msg An object in which to store the message contents. + This object should not have previous contents, otherwise + the behavior is undefined. The type must be @b MoveAssignable and @b MoveConstructible. @param ec Set to the error, if any occurred. @@ -709,8 +713,11 @@ read( dynamic buffer's input sequence will be given to the parser first. - @param msg An object to be overwritten with the message contents. + @param msg An object in which to store the message contents. + This object should not have previous contents, otherwise + the behavior is undefined. The type must be @b MoveAssignable and @b MoveConstructible. + The object must remain valid at least until the handler is called; ownership is not transferred.