PIEthernet fix tcp-server close (properly delete all clients)

PIEthernet::stopThreadedListen() method
decompose client to 2 implementations - server-side and client-side
This commit is contained in:
2024-09-11 21:41:55 +03:00
parent b24b5a1346
commit da4b09be9e
10 changed files with 257 additions and 101 deletions

View File

@@ -243,6 +243,10 @@ public:
//! \~russian Возвращает запущен ли поток чтения
bool isThreadedRead() const;
//! \~english Returns if threaded read is stopping
//! \~russian Возвращает останавливается ли поток чтения
bool isThreadedReadStopping() const { return read_thread.isStopping(); }
//! \~english Start threaded read
//! \~russian Запускает потоковое чтение
void startThreadedRead();
@@ -565,8 +569,6 @@ protected:
static PIIODevice * newDeviceByPrefix(const char * prefix);
bool isThreadedReadStopping() const { return read_thread.isStopping(); }
DeviceMode mode_ = ReadOnly;
DeviceOptions options_;
ReadRetFunc func_read = nullptr;