MCPcopy Create free account
hub / github.com/SmingHub/Sming / response

Method response

Sming/Components/Network/src/Network/Ftp/FtpServerConnection.cpp:444–462  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

442}
443
444void FtpServerConnection::response(int code, String text, char sep)
445{
446 String response = String(code, DEC);
447 response += sep;
448 if(text.length() == 0) {
449 if(code >= 200 && code <= 399) { // Just for simplify
450 response += _F("OK");
451 } else {
452 response += _F("FAIL");
453 }
454 } else {
455 response += text;
456 }
457 response += "\r\n";
458
459 debug_d("> %s", response.c_str());
460 writeString(response);
461 flush();
462}

Callers 1

onCommandMethod · 0.45

Calls 3

StringClass · 0.50
lengthMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected