#include <string.h>
#include <sys/param.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "freertos/event_groups.h"
#include "esp_system.h"
#include "esp_wifi.h"
#include "esp_event.h"
#include "esp_log.h"
#include "nvs_flash.h"
#include "esp_netif.h"
#include "protocol_examples_common.h"
#include "lwip/err.h"
#include "lwip/sockets.h"
#include "lwip/sys.h"
#include <lwip/netdb.h>
Go to the source code of this file.
◆ TCP_HOST_IP_ADDR
#define TCP_HOST_IP_ADDR CONFIG_SERVER_IP_ADDRESS |
◆ TCP_PORT
#define TCP_PORT CONFIG_SERVER_PORT |
◆ tcp_close_network_manager()
Shutdown active connection, deallocate memory.
- Parameters
-
- Returns
- void
◆ tcp_network_manager()
Manages TCP connection to the server.
- Parameters
-
- Returns
- void
◆ tcp_receive_data()
Receives data from TCP server.
- Parameters
-
- Returns
- char array which contains data received
◆ tcp_send_data()
Sends data to the server through a TCP socket.
- Parameters
-
nm | A pointer to tcp_network_data struct |
payload | char array which contains data to be sent |
- Returns
- int - returns -1 if sending failed, number of bytes sent if successfully sent the data