Add async support for FastCGI
This commit is contained in:
@ -13,7 +13,7 @@
|
||||
#include "http.h"
|
||||
#include "uri.h"
|
||||
|
||||
#define FASTCGI_CHUNKED 1
|
||||
#define FASTCGI_TIMEOUT 3600
|
||||
|
||||
#define FASTCGI_BACKEND_PHP 1
|
||||
|
||||
@ -23,12 +23,12 @@
|
||||
|
||||
typedef struct {
|
||||
int mode;
|
||||
sock socket;
|
||||
int in, out, err;
|
||||
sock socket, out;
|
||||
int fd_err, fd_out;
|
||||
FILE *err;
|
||||
unsigned short req_id;
|
||||
int app_status;
|
||||
const char *webroot;
|
||||
char *out_buf;
|
||||
unsigned short out_len, out_off;
|
||||
char *r_addr;
|
||||
char *r_host;
|
||||
} fastcgi_cnx_t;
|
||||
@ -37,18 +37,24 @@ char *fastcgi_add_param(char *buf, const char *key, const char *value);
|
||||
|
||||
int fastcgi_init(fastcgi_cnx_t *conn, int mode, unsigned int req_num, const sock *client, const http_req *req, const http_uri *uri);
|
||||
|
||||
int fastcgi_close_cnx(fastcgi_cnx_t *cnx);
|
||||
|
||||
int fastcgi_close_stdin(fastcgi_cnx_t *conn);
|
||||
|
||||
int fastcgi_php_error(const fastcgi_cnx_t *conn, const char *msg, int msg_len, char *err_msg);
|
||||
|
||||
int fastcgi_header(fastcgi_cnx_t *conn, http_res *res, char *err_msg);
|
||||
int fastcgi_recv_frame(fastcgi_cnx_t *cnx);
|
||||
|
||||
int fastcgi_send(fastcgi_cnx_t *conn, sock *client, int flags);
|
||||
int fastcgi_header(fastcgi_cnx_t *cnx, http_res *res, char *err_msg);
|
||||
|
||||
int fastcgi_dump(fastcgi_cnx_t *conn, char *buf, long len);
|
||||
long fastcgi_send(fastcgi_cnx_t *cnx, sock *client);
|
||||
|
||||
int fastcgi_dump(fastcgi_cnx_t *cnx, char *buf, long len);
|
||||
|
||||
int fastcgi_receive(fastcgi_cnx_t *cnx, sock *client, unsigned long len);
|
||||
|
||||
int fastcgi_receive_chunked(fastcgi_cnx_t *cnx, sock *client);
|
||||
|
||||
int fastcgi_receive(fastcgi_cnx_t *conn, sock *client, unsigned long len);
|
||||
|
||||
int fastcgi_receive_chunked(fastcgi_cnx_t *conn, sock *client);
|
||||
|
||||
#endif //SESIMOS_FASTCGI_H
|
||||
|
Reference in New Issue
Block a user