nettype_tcp.h 701 B

12345678910111213141516171819202122232425262728
  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 "platform_net_socket.h"
  11. #include "network.h"
  12. #include "mqtt_error.h"
  13. #ifdef __cplusplus
  14. extern "C" {
  15. #endif
  16. int nettype_tcp_read(network_t *n, unsigned char *buf, int len, int timeout);
  17. int nettype_tcp_write(network_t *n, unsigned char *buf, int len, int timeout);
  18. int nettype_tcp_connect(network_t* n);
  19. void nettype_tcp_disconnect(network_t* n);
  20. #ifdef __cplusplus
  21. }
  22. #endif
  23. #endif