6 #include "freertos/FreeRTOS.h" 7 #include "freertos/task.h" 8 #include "freertos/event_groups.h" 9 #include "esp_system.h" 11 #include "esp_event.h" 13 #include "nvs_flash.h" 14 #include "esp_netif.h" 15 #include "protocol_examples_common.h" 17 #include "lwip/sockets.h" 19 #include <lwip/netdb.h> 21 #define TCP_HOST_IP_ADDR CONFIG_SERVER_IP_ADDRESS 22 #define TCP_PORT CONFIG_SERVER_PORT char * tcp_receive_data(struct tcp_network_data *nm)
Receives data from TCP server.
Definition: tcp_handler.c:77
int sock
Definition: tcp_handler.h:31
char addr_str[128]
Definition: tcp_handler.h:27
char rx_buffer[128]
Definition: tcp_handler.h:26
void tcp_network_manager(struct tcp_network_data *nm)
Manages TCP connection to the server.
Definition: tcp_handler.c:11
void tcp_close_network_manager(struct tcp_network_data *nm)
Shutdown active connection, deallocate memory.
Definition: tcp_handler.c:109
int addr_family
Definition: tcp_handler.h:28
int ip_protocol
Definition: tcp_handler.h:29
struct sockaddr_in dest_addr
Definition: tcp_handler.h:30
int tcp_send_data(struct tcp_network_data *nm, char *payload)
Sends data to the server through a TCP socket.
Definition: tcp_handler.c:49
Definition: tcp_handler.h:24