aboutsummaryrefslogtreecommitdiff
path: root/gmid.h
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2021-09-26 17:00:07 +0000
committerOmar Polo <op@omarpolo.com>2021-09-26 17:00:07 +0000
commit741b69be96397e0ec6db0c84b4ead4f41363ea98 (patch)
tree794714b8be9ed3110990ae0e79e2050fe67dda78 /gmid.h
parent83fe545a2b8c892e70ecf6b48180c27e6bc6b414 (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.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/gmid.h b/gmid.h
index 34da70c..d0b17bd 100644
--- a/gmid.h
+++ b/gmid.h
@@ -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);