A tool for adding anime to your anidb list.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
471B

  1. #ifndef _NET_H
  2. #define _NET_H
  3. #include <stdint.h>
  4. #include <sys/types.h>
  5. #include "error.h"
  6. /*
  7. * Initializes the net class
  8. */
  9. enum error net_init();
  10. /*
  11. * Send and read data to and from the api
  12. * Returns the number of bytes sent/read or -1 on error
  13. * If the error is EINTR, it returns -2
  14. */
  15. ssize_t net_send(const void *msg, size_t msg_len);
  16. ssize_t net_read(void *out_data, size_t read_size);
  17. /*
  18. * Frees the net class
  19. */
  20. void net_free();
  21. #endif /* _NET_H */