Refactored file assemble and send code #4601

This commit is contained in:
Jerry (Xinyu Hou) 2015-05-22 11:27:57 -07:00
parent 1df566d241
commit a81b88c730
12 changed files with 140 additions and 209 deletions

View file

@ -141,15 +141,6 @@ public:
*/
void disconnect();
//! Clears the file buffer
void clearReceivedFileData();
//! Set the expected size of receiving file
void setExpectedFileSize(String data);
//! Received a chunk of file data
void fileChunkReceived(String data);
//! Create a new thread and use it to send file to client
void sendFileToClient(const char* filename);
@ -178,8 +169,11 @@ public:
//! Return true if recieved file size is valid
bool isReceivedFileSizeValid();
//! Return expected file size
size_t getExpectedFileSize() { return m_expectedFileSize; }
//! Return expected file data size
size_t& getExpectedFileSize() { return m_expectedFileSize; }
//! Return received file data
String& getReceivedFileData() { return m_receivedFileData; }
//@}