use common buffer

This commit is contained in:
technyon
2023-03-22 23:06:13 +01:00
parent ff4bd2618f
commit 04ebf17b1a
5 changed files with 30 additions and 28 deletions

View File

@@ -21,7 +21,7 @@ enum class NetworkDeviceType
class Network
{
public:
explicit Network(Preferences* preferences, const String& maintenancePathPrefix);
explicit Network(Preferences* preferences, const String& maintenancePathPrefix, char* buffer, size_t bufferSize);
void initialize();
bool update();
@@ -127,6 +127,10 @@ private:
bool _mqttEnabled = true;
static unsigned long _ignoreSubscriptionsTs;
long _rssiPublishInterval = 0;
char* _buffer;
size_t _bufferSize;
std::function<void()> _keepAliveCallback = nullptr;
std::vector<std::function<void()>> _reconnectedCallbacks;