Initial TCP server

This commit is contained in:
2025-06-05 01:44:58 -04:00
parent 6abf6be32d
commit e87abf9eef
18 changed files with 373 additions and 90 deletions

View File

@@ -0,0 +1,20 @@
//
// Created by Johnathon Slightham on 2025-06-12.
//
#ifndef CONFIG_H
#define CONFIG_H
#define NVS_FLASH_NAMESPACE "app"
#define DEFAULT_MODULE_ID 0
#define DEFAULT_MODULE_TYPE 0
#define MODULE_ID_KEY "module_id"
#define MODULE_TYPE_KEY "module_type"
enum ModuleType { splitter }; // todo: maybe this should be flatbuffer
#endif //CONFIG_H

View File

@@ -0,0 +1,18 @@
//
// Created by Johnathon Slightham on 2025-06-01.
//
#ifndef TCP_H
#define TCP_H
#define TCP_DEFAULT_LISTEN_BACKLOG 1
#define KEEPALIVE_IDLE 7200
#define KEEPALIVE_INTERVAL 75
#define KEEPALIVE_COUNT 9
#define SLEEP_AFTER_FAIL_MS 5000
#define TCP_PORT 3001
#endif //TCP_H

View File

@@ -5,8 +5,9 @@
#ifndef WIFI_H
#define WIFI_H
#define WIFI_SSID "botchain"
#define SOFTAP_CHANNEL 1
#define SOFTAP_MAX_CONNECTIONS 10
// SoftAP Configuration
#define WIFI_SSID "botchain"
#define SOFTAP_CHANNEL 1
#define SOFTAP_MAX_CONNECTIONS 10
#endif //WIFI_H