A clone of btpd with my configuration changes.
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

32 рядки
543 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. int http_get(struct http **ret,
  17. void (*cb)(struct http *, struct http_res *, void *),
  18. void *arg,
  19. const char *fmt, ...);
  20. void http_cancel(struct http *http);
  21. int http_succeeded(struct http_res *res);
  22. long http_server_busy_time(const char *url, long s);
  23. void http_init(void);
  24. #endif