kenba / via-httplib

A library for embedding an HTTP or HTTPS server in C++ applications.
Boost Software License 1.0
46 stars 15 forks source link

Replace RECEIVED event_callback with call to new receive_callback_type #20

Closed kenba closed 1 year ago

kenba commented 1 year ago

In C++20 asio permits a receive buffer to be a local variable in a coroutine, see: talking-async.

To prepare for migrating to coroutines, a receive event should call a new receive_callback_type with a pointer to the receive buffer and the number of bytes received, instead of calling the current event_callback_type with a RECEIVED event id.

kenba commented 1 year ago

Incorporated into tag 1.10.1.