-
Notifications
You must be signed in to change notification settings - Fork 160
use evbuffer_add_reference send json data have a problem #140
Comments
I think you should show your code. |
The key code is as follows,thanks!Replacing evbuffer_add_reference with evbuffer_add_printf can solve the problem. why?? Thanks for your answer. int HttpService::startServer(const char *addr, uint16_t port, int backlog)
#ifndef EVHTP_DISABLE_EVTHR
void HttpRequest::login(evhtp_request_t *req, void *arg) {
void LoginRequest::login(evhtp_request_t *req, void *arg)
|
there is a problem when use evbuffer_add_reference function to send json data ,such as send the data of {"code":20000,"messsage":"success"},the client receive data is 20000,"messsage":"success"}, why?? thanks for you answer。
The text was updated successfully, but these errors were encountered: