FTP: File Transfer Protocol¶
https://en.m.wikipedia.org/wiki/File_Transfer_Protocol
Server API¶
-
class
FtpServer
: public TcpServer¶ - #include <FtpServer.h>
Public Functions
-
FtpServer
()¶
-
virtual bool
listen
(int port, bool useSsl = false)¶
-
void
setKeepAlive
(uint16_t seconds)¶
-
void
shutdown
()¶
-
const Vector<TcpConnection *> &
getConnections
() const¶
-
virtual bool
connect
(IpAddress addr, uint16_t port, bool useSsl = false)¶
-
virtual void
close
()¶
-
int
writeString
(const char *data, uint8_t apiflags = TCP_WRITE_FLAG_COPY)¶
-
virtual int
write
(const char *data, int len, uint8_t apiflags = TCP_WRITE_FLAG_COPY)¶ Base write operation.
- Parameters
data
:len
:apiflags
: TCP_WRITE_FLAG_COPY, TCP_WRITE_FLAG_MORE
- Return Value
int
: -1 on error
-
int
write
(IDataSourceStream *stream)¶
-
uint16_t
getAvailableWriteSize
()¶
-
void
flush
()¶
-
void
setTimeOut
(uint16_t waitTimeOut)¶
-
IpAddress
getRemoteIp
() const¶
-
uint16_t
getRemotePort
() const¶
-
void
setDestroyedDelegate
(TcpConnectionDestroyedDelegate destroyedDelegate)¶ Sets a callback to be called when the object instance is destroyed.
- Parameters
destroyedDelegate
:
-
void
setSslInitHandler
(Ssl::Session::InitDelegate handler)¶ Set the SSL session initialisation callback.
- Parameters
handler
:
-
bool
setSslConnection
(Ssl::Connection *connection)¶
Public Members
-
uint16_t
activeClients
= 0¶
-