Ok maybe i didn't detailled enough my response, but at least you can search a bit also.
Take a look better at your Arduino library code (ESP8266FtpServer.cpp)
Where is the implementation of "FtpServer::clientConnected()"
Where is the implementation of "FtpServer:
rocessCommand()"
etc.
See below :
void FtpServer::handleFTP() // <- it's what you wrapped, no ?
{
if((int32_t) ( millisDelay - millis() ) > 0 ) // <- 1st problem, maybe return all time millis() is unkow by B4R ! And probably millisDealy too
return;
// And all under are not wrapped, what happend under B4R, nothing happen too...
if (ftpServer.hasClient()) {
client.stop();
client = ftpServer.available();
}
if( cmdStatus == 0 )
{
if( client.connected()) // <- What happen here, it's your B4R code who manage that ?
// No it's returned to Arduino library code, but how the compiler could do the trick ?
disconnectClient();
cmdStatus = 1;
}
.../...
else if( cmdStatus > 2 && ! ((int32_t) ( millisEndConnection - millis() ) > 0 )) // <- Again a test on an internal Arduino timer
{
client.println("530 Timeout");
millisDelay = millis() + 200; // delay of 200 ms
cmdStatus = 0;
}
}
B4R is not magic and can't wrap the things for you.
It's why i told you study a bit more the tutorials, nothing else.
And to be honest i fear that to implemente a void "sub" who contains an "if" on an "
Arduino internal timer (millis())" wont be working properly under B4R
So a best way is to implement all that is needed.
But if you know better than others it's ok.
EDIT :
in B4R we have just to launch FTPserveur.begin to initialise FTPserver, and after to put FTPserveur.handleFTP() in a loop, nothing else.
it's why i say that above !
But i'm quite sure you prepare yourself to big surprises.
For my part i leave this thread, not too much time to catch your eyes where it's easy to find why that'll don't work.