В libevent оба следующих API будут вызывать функцию обратного вызова после завершения транзакции HTTP?
//from event2/http.h
/**
* Creates a new request object that needs to be filled in with the request
* parameters. The callback is executed when the request completed or an
* error occurred.
*/
struct evhttp_request *evhttp_request_new(
void (*cb)(struct evhttp_request *, void *), void *arg);
/*The callback function will be called on the completion of the request after
* the output data has been written and before the evhttp_request object
* is destroyed ....*/
void evhttp_request_set_on_complete_cb(struct evhttp_request *req,
void (*cb)(struct evhttp_request *, void *), void *cb_arg);
Формулировка evhttp_request_new(..) отличается от формулировки evhttp_request_set_on_complete_cb(..), но в моем тесте обратный вызов в evhttp_request_new(..) действительно вызывается в конце транзакции HTTP.