diff options
author | Omar Polo <op@omarpolo.com> | 2021-09-26 17:00:07 +0000 |
---|---|---|
committer | Omar Polo <op@omarpolo.com> | 2021-09-26 17:00:07 +0000 |
commit | 741b69be96397e0ec6db0c84b4ead4f41363ea98 (patch) | |
tree | 794714b8be9ed3110990ae0e79e2050fe67dda78 /gmid.h | |
parent | 83fe545a2b8c892e70ecf6b48180c27e6bc6b414 (diff) |
fastcgi completely asynchronous
This changes the fastcgi implementation from a blocking I/O to an
async implementation on top of libevent' bufferevents.
Should improve the responsiveness of gmid especially when using remote
fastcgi applications.
Diffstat (limited to 'gmid.h')
-rw-r--r-- | gmid.h | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -68,7 +68,8 @@ struct fcgi { char *port; char *prog; int fd; - struct event e; + + struct bufferevent *bev; /* number of pending clients */ int pending; @@ -382,8 +383,10 @@ int executor_main(struct imsgbuf*); /* fcgi.c */ void fcgi_close_backend(struct fcgi *); -void handle_fcgi(int, short, void*); -void send_fcgi_req(struct fcgi*, struct client*); +void fcgi_read(struct bufferevent *, void *); +void fcgi_write(struct bufferevent *, void *); +void fcgi_error(struct bufferevent *, short, void *); +void fcgi_req(struct fcgi *, struct client *); /* sandbox.c */ void sandbox_server_process(void); |