5 #include "http_request.h"
6 #include "http_response.h"
8 typedef struct httpd_s httpd_t
;
10 struct httpd_callbacks_s
{
12 void* (*conn_init
)(void *opaque
, unsigned char *local
, int locallen
, unsigned char *remote
, int remotelen
);
13 void (*conn_request
)(void *ptr
, http_request_t
*request
, http_response_t
**response
);
14 void (*conn_destroy
)(void *ptr
);
16 typedef struct httpd_callbacks_s httpd_callbacks_t
;
19 httpd_t
*httpd_init(logger_t
*logger
, httpd_callbacks_t
*callbacks
, int max_connections
, int use_rtsp
);
21 int httpd_start(httpd_t
*httpd
, unsigned short *port
);
22 void httpd_stop(httpd_t
*httpd
);
24 void httpd_destroy(httpd_t
*httpd
);