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" 18 #include "lwip/sockets.h" 20 #include <lwip/netdb.h> 23 #define TCP_HOST_IP_ADDR CONFIG_TCP_IP_ADDRESS 24 #define TCP_PORT CONFIG_TCP_PORT int sock
Definition: tcp_handler.h:33
char addr_str[128]
Definition: tcp_handler.h:29
char rx_buffer[128]
Definition: tcp_handler.h:28
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:30
int ip_protocol
Definition: tcp_handler.h:31
struct sockaddr_in dest_addr
Definition: tcp_handler.h:32
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
char * tcp_recieve_data(struct tcp_network_data *nm)
Receives data from TCP server.
Definition: tcp_handler.c:77
Definition: tcp_handler.h:26