aboutsummaryrefslogtreecommitdiff
path: root/src/fastcgi.h
blob: d2199b41b6cfbf5f7ce44d05c7792cc28d29e86b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#ifndef MAGI_INCLUDED_FASTCGI
#define MAGI_INCLUDED_FASTCGI

#include "field.h"
#include "request.h"


struct magi_session {
    void (*callback)(struct magi_field * field, char * buffer, int len);
    int                       max_post;
    struct magi_socket_list * sockets;
};

int magi_fcgi(struct magi_session * session, int socket);

/*
 * Returns null if succeed, otherwise error code.
 */
int magi_fcgi_accept(
    struct magi_request * request,
    struct magi_session * session,
    /* Callback will be used only for files loaded via multipart. */
    /* Null callback disables callback system. */
    void (*callback)(
        struct magi_field * field, char * buffer, int len, void * thing),
    void * thing,
    int    max_post);


#endif