Mercurial > urweb
annotate include/urweb/request.h @ 2208:cb74460f046a
Merge.
author | Ziv Scully <ziv@mit.edu> |
---|---|
date | Fri, 30 May 2014 12:00:44 -0400 |
parents | c93fbd139732 |
children | 35c1341b0179 |
rev | line source |
---|---|
ezyang@1739 | 1 #ifndef REQUEST_H |
ezyang@1739 | 2 #define REQUEST_H |
ezyang@1739 | 3 |
ezyang@1739 | 4 #include <sys/types.h> |
ezyang@1739 | 5 |
ezyang@1739 | 6 #include "types.h" |
ezyang@1739 | 7 |
ezyang@1739 | 8 typedef struct uw_rc *uw_request_context; |
ezyang@1739 | 9 |
grrwlf@1997 | 10 void uw_request_init(uw_app *app, uw_loggers* ls); |
ezyang@1739 | 11 void uw_sign(const char *in, char *out); |
ezyang@1739 | 12 |
ezyang@1739 | 13 uw_request_context uw_new_request_context(void); |
ezyang@1739 | 14 void uw_free_request_context(uw_request_context); |
ezyang@1739 | 15 |
grrwlf@1997 | 16 request_result uw_request(uw_request_context rc, uw_context ctx, |
ezyang@1739 | 17 char *method, char *path, char *query_string, |
ezyang@1739 | 18 char *body, size_t body_len, |
ezyang@1739 | 19 void (*on_success)(uw_context), void (*on_failure)(uw_context), |
ezyang@1739 | 20 void *logger_data, uw_logger log_error, uw_logger log_debug, |
ezyang@1739 | 21 int sock, |
ezyang@1739 | 22 int (*send)(int sockfd, const void *buf, ssize_t len), |
ezyang@1739 | 23 int (*close)(int fd)); |
ezyang@1739 | 24 |
grrwlf@1997 | 25 uw_context uw_request_new_context(int id, uw_app *app, uw_loggers *ls); |
ezyang@1739 | 26 |
ezyang@1739 | 27 typedef struct { |
ezyang@1739 | 28 uw_app *app; |
grrwlf@1997 | 29 uw_loggers *loggers; |
grrwlf@1997 | 30 } pruner_data; |
ezyang@1739 | 31 |
ezyang@1739 | 32 void *client_pruner(void *data); |
ezyang@1739 | 33 |
ezyang@1739 | 34 int pthread_create_big(pthread_t *outThread, void *foo, void *threadFunc, void *arg); |
ezyang@1739 | 35 |
ezyang@1739 | 36 #endif |