libevent evhttp服务器
evhttp_set_cb(http,"/master", get_master,NULL);// masterevhttp_set_gencb(http, get_master_pgn,NULL);// master/pgn/{8}structevhttp_bound_socket*socket=evhttp_bind_socket_with_handle(http, "127.0.0.1",port);if(!socket) {printf("could not bind socket to http://127.0.0.1:%d/\n", ...
Maybe I'm missing something but as far as I can tell there is no way to use evhttp_request_set_header_cb() for incoming connections. You can set request callbacks on an evhttp using either evhttp_set_cb() or evhttp_set_gencb(). These cal...