Compare commits

...

2 Commits

Author SHA1 Message Date
4990a7ff25 Corrected some comments 2020-04-25 12:00:29 +02:00
674577605d Cleaning the object destructor and stop method 2020-04-25 11:59:56 +02:00
2 changed files with 12 additions and 2 deletions

View File

@ -52,9 +52,19 @@ class FTPServer : public TCPServer<T>
virtual ~FTPServer() virtual ~FTPServer()
{ {
_dataServer.stop();
free(_login); free(_password); free(_login); free(_password);
} }
virtual void stop()
{
if(TCPServer<T>::_serverStarted)
{
_dataServer.stop();
TCPServer<T>::stop();
}
}
protected: protected:
virtual T* createNewClient(WiFiClient wc) virtual T* createNewClient(WiFiClient wc)
{ {

View File

@ -22,8 +22,8 @@ class TCPClient
WiFiClient _client; WiFiClient _client;
uint8_t *_data; //The actual data uint8_t *_data; //The actual data
uint16_t _dataSize; //The logic size of the data contained uint16_t _dataSize; //The logical size of the data contained
uint16_t _dataBufferSize; //The physic size of the buffer uint16_t _dataBufferSize; //The physical size of the buffer
boolean _newDataAvailable; boolean _newDataAvailable;
uint8_t _id; uint8_t _id;