Server::send response parameter changed to const. Some cleanup of examples related to this.
This commit is contained in:
parent
c934c9aefe
commit
a69e32290f
3 changed files with 18 additions and 14 deletions
|
|
@ -325,8 +325,8 @@ namespace SimpleWeb {
|
|||
}
|
||||
|
||||
///Use this function if you need to recursively send parts of a longer message
|
||||
void send(std::shared_ptr<Response> &response, const std::function<void(const error_code &)> &callback = nullptr) const {
|
||||
asio::async_write(*response->socket, response->streambuf, [response, callback](const error_code &ec, size_t /*bytes_transferred*/) mutable {
|
||||
void send(const std::shared_ptr<Response> &response, const std::function<void(const error_code &)> &callback = nullptr) const {
|
||||
asio::async_write(*response->socket, response->streambuf, [response, callback](const error_code &ec, size_t /*bytes_transferred*/) {
|
||||
if(callback)
|
||||
callback(ec);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue