5 ms·
what is the src of the C function?
by int0x80 8y ago
what is the src of the C function?
- drenvuk 8y agoCheck this file out, it's in the example that's provided: https://github.com/Taymindis/sample-ngx-cfunc-project/blob/master/ngx-cfunc-ggl-direction/src/main/CfuncGglDirection.cpp https://github.com/Taymindis/sample-ngx-cfunc-project/blob/m... I've stripped out everything of 'getRoute' and only provide a response of a global variable 'thing' that never changes. std::string thing = "{\"result\": \"Hello World!\"}"; void getRoute(ngx_http_c_func_ctx_t* ctx) { ngx_http_c_func_write_resp( ctx, 200, NULL, ngx_http_c_func_content_type_json, ::thing.c_str(), ::thing.length() ); }