transfer.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. /* This file is part of libepistle.
  2. *
  3. * libepistle is free software: you can redistribute it and/or modify
  4. * it under the terms of the GNU Lesser General Public License as published by
  5. * the Free Software Foundation, either version 3 of the License, or
  6. * (at your option) any later version.
  7. *
  8. * libepistle is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU Lesser General Public License for more details.
  12. *
  13. * You should have received a copy of the GNU Lesser General Public License
  14. * along with libepistle. If not, see <http://www.gnu.org/licenses/>.
  15. */
  16. #ifndef EPISTLE_TRANSFER_H
  17. #define EPISTLE_TRANSFER_H
  18. #include <primo/err.h>
  19. #include <stdint.h>
  20. int
  21. recv_byte(void *buf, int fd, int *recvd, int wait, Err *err);
  22. int
  23. send_byte(uint8_t byte, int fd, int *sent, int wait, Err *err);
  24. int
  25. recv_buf(void *buf, int fd, uint32_t len, uint32_t *recvd, int wait, Err *err);
  26. int
  27. send_buf(void *buf, int fd, uint32_t len, uint32_t *sent, int wait, Err *err);
  28. #endif