annotate include/request.h @ 1522:4d0b80dd4c37
Introduce URWEB_STACK_SIZE environment variable (based on a patch by Hao Deng)
author |
Adam Chlipala <adam@chlipala.net> |
date |
Tue, 02 Aug 2011 14:31:37 -0400 |
parents |
36f7d1debb37 |
children |
|
rev |
line source |
adamc@853
|
1 #ifndef REQUEST_H
|
adamc@853
|
2 #define REQUEST_H
|
adamc@853
|
3
|
adamc@853
|
4 #include <sys/types.h>
|
adamc@853
|
5
|
adamc@853
|
6 #include "types.h"
|
adamc@853
|
7
|
adamc@853
|
8 typedef struct uw_rc *uw_request_context;
|
adamc@853
|
9
|
adamc@1094
|
10 void uw_request_init(uw_app *app, void *logger_data, uw_logger log_error, uw_logger log_debug);
|
adamc@853
|
11 void uw_sign(const char *in, char *out);
|
adamc@853
|
12
|
adamc@853
|
13 uw_request_context uw_new_request_context(void);
|
adamc@853
|
14 void uw_free_request_context(uw_request_context);
|
adamc@853
|
15
|
adamc@854
|
16 request_result uw_request(uw_request_context, uw_context,
|
adamc@854
|
17 char *method, char *path, char *query_string,
|
adamc@854
|
18 char *body, size_t body_len,
|
adamc@856
|
19 void (*on_success)(uw_context), void (*on_failure)(uw_context),
|
adamc@856
|
20 void *logger_data, uw_logger log_error, uw_logger log_debug,
|
adamc@863
|
21 int sock,
|
adamc@863
|
22 int (*send)(int sockfd, const void *buf, ssize_t len),
|
adamc@863
|
23 int (*close)(int fd));
|
adamc@853
|
24
|
adam@1446
|
25 uw_context uw_request_new_context(int id, uw_app*, void *logger_data, uw_logger log_error, uw_logger log_debug);
|
adamc@856
|
26
|
adamc@856
|
27 typedef struct {
|
adamc@1094
|
28 uw_app *app;
|
adamc@856
|
29 void *logger_data;
|
adamc@856
|
30 uw_logger log_error, log_debug;
|
adamc@856
|
31 } loggers;
|
adamc@853
|
32
|
adamc@853
|
33 void *client_pruner(void *data);
|
adamc@853
|
34
|
adam@1522
|
35 int pthread_create_big(pthread_t *outThread, void *foo, void *threadFunc, void *arg);
|
adam@1522
|
36
|
adamc@853
|
37 #endif
|