FtpServer.h
Go to the documentation of this file.
1 /****
2  * Sming Framework Project - Open Source framework for high efficiency native ESP8266 development.
3  * Created 2015 by Skurydin Alexey
4  * http://github.com/SmingHub/Sming
5  * All files of the Sming Core are provided under the LGPL v3 license.
6  *
7  * FtpServer.h
8  *
9  ****/
10 
11 #pragma once
12 
13 #include "TcpServer.h"
14 #include "WHashMap.h"
15 #include "WString.h"
16 
18 
23 class FtpServer : public TcpServer
24 {
25  friend class FtpServerConnection;
26 
27 public:
29  {
30  setTimeOut(900); // Update timeout
31  }
32 
33  void addUser(const String& login, const String& pass);
34  bool checkUser(const String& login, const String& pass);
35 
36 protected:
37  TcpConnection* createClient(tcp_pcb* clientTcp) override;
38 
39  virtual bool onCommand(String cmd, String data, FtpServerConnection& connection);
40 
41 private:
43 };
44 
bool checkUser(const String &login, const String &pass)
void addUser(const String &login, const String &pass)
Definition: TcpConnection.h:39
The String class.
Definition: WString.h:136
void setTimeOut(uint16_t waitTimeOut)
#define SMING_DEPRECATED
Definition: sming_attr.h:30
Definition: TcpServer.h:30
Definition: FtpServerConnection.h:25
virtual bool onCommand(String cmd, String data, FtpServerConnection &connection)
FtpServer()
Definition: FtpServer.h:28
TcpConnection * createClient(tcp_pcb *clientTcp) override
Definition: FtpServer.h:23