A clone of btpd with my configuration changes.
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

33 lignes
582 B

  1. #ifndef BTPD_HTTP_H
  2. #define BTPD_HTTP_H
  3. struct http;
  4. enum http_status {
  5. HRES_OK,
  6. HRES_FAIL,
  7. HRES_CANCEL
  8. };
  9. struct http_res {
  10. enum http_status res;
  11. long code;
  12. const char *errmsg;
  13. char *content;
  14. size_t length;
  15. };
  16. __attribute__((format (printf, 4, 5)))
  17. int http_get(struct http **ret,
  18. void (*cb)(struct http *, struct http_res *, void *),
  19. void *arg,
  20. const char *fmt, ...);
  21. void http_cancel(struct http *http);
  22. int http_succeeded(struct http_res *res);
  23. long http_server_busy_time(const char *url, long s);
  24. void http_init(void);
  25. #endif