NGINX Unit - universal web app server - a lightweight and versatile open source server that simplifies the application stack by natively executing application code across eight different programming language runtimes.
Find a file
Max Romanov e7a0634a71 Application-side message processing.
Usage on the router side:

    nxt_app_wmsg_t       wmsg;
    nxt_app_parse_ctx_t  parse_ctx;

    nxt_app_http_req_init(task, &parse_ctx);

    /* parse incoming request data */
    if (nxt_app_http_req_parse(task, &parse_ctx, buf) == NXT_DONE) {

        /* choose app */
        nxt_app = nxt_select_app(... &parse_ctx.r ...);

        /* find port */
        wmsg.port = nxt_get_app_port(... nxt_app ...);
        wmsg.buf = &wmsg.write;

        /* fill write message buffer in shared mem */
        nxt_app->prepare_msg(task, &parse_ctx.r, &wmsg);

        /* send message to app for processing */
        nxt_port_socket_write(task, wmsg.port, NXT_PORT_MSG_DATA,
                              -1, 0, 0, wmsg.write);
    }
2017-06-23 19:20:08 +03:00
auto Store pointer to shared memory start in buf->parent. 2017-06-23 19:20:04 +03:00
src Application-side message processing. 2017-06-23 19:20:08 +03:00
test HTTP parser: reduced memory consumption of header fields list. 2017-06-20 22:32:13 +03:00
configure Using shared memory to send data via nxt_port. 2017-05-12 20:32:41 +03:00