nettype_tcp.h 668 B

123456789101112131415161718192021222324252627
  1. /*
  2. * @Author: jiejie
  3. * @Github: https://github.com/jiejieTop
  4. * @Date: 2019-12-15 13:39:00
  5. * @LastEditTime: 2020-10-17 14:17:10
  6. * @Description: the code belongs to jiejie, please keep the author information and source code according to the license.
  7. */
  8. #ifndef _NETTYPE_TCP_H_
  9. #define _NETTYPE_TCP_H_
  10. #include "network.h"
  11. #include "mqtt_error.h"
  12. #ifdef __cplusplus
  13. extern "C" {
  14. #endif
  15. int nettype_tcp_read(network_t *n, unsigned char *buf, int len, int timeout);
  16. int nettype_tcp_write(network_t *n, unsigned char *buf, int len, int timeout);
  17. int nettype_tcp_connect(network_t* n);
  18. void nettype_tcp_disconnect(network_t* n);
  19. #ifdef __cplusplus
  20. }
  21. #endif
  22. #endif