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 
17 #pragma once
18 
19 #include "TcpServer.h"
20 #include "WHashMap.h"
21 #include "WString.h"
22 
24 
25 class FtpServer : public TcpServer
26 {
27  friend class FtpServerConnection;
28 
29 public:
31  {
32  setTimeOut(900); // Update timeout
33  }
34 
35  void addUser(const String& login, const String& pass);
36  bool checkUser(const String& login, const String& pass);
37 
38 protected:
39  TcpConnection* createClient(tcp_pcb* clientTcp) override;
40 
41  virtual bool onCommand(String cmd, String data, FtpServerConnection& connection);
42 
43 private:
45 };
46 
48 
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:28
Definition: FtpServerConnection.h:29
virtual bool onCommand(String cmd, String data, FtpServerConnection &connection)
FtpServer()
Definition: FtpServer.h:30
TcpConnection * createClient(tcp_pcb *clientTcp) override
Definition: FtpServer.h:25