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 HOST_IP_ADDR CONFIG_SERVER_IP_ADDRESS 22 #define PORT CONFIG_SERVER_PORT Definition: udp_handler.h:24
int send_data(struct network_data *nm, char *payload)
Sends data to the server through a UDP socket.
Definition: udp_handler.c:38
int ip_protocol
Definition: udp_handler.h:29
char * receive_data(struct network_data *nm)
Receives data from UDP server.
Definition: udp_handler.c:59
char rx_buffer[128]
Definition: udp_handler.h:26
char addr_str[128]
Definition: udp_handler.h:27
struct sockaddr_in dest_addr
Definition: udp_handler.h:30
void close_network_manager(struct network_data *nm)
Shutdown active connection, deallocate memory.
Definition: udp_handler.c:85
int addr_family
Definition: udp_handler.h:28
void network_manager(struct network_data *nm)
Manages UDP connection to the server.
Definition: udp_handler.c:11
int sock
Definition: udp_handler.h:31