The lib with which to make LPC1768 a simple HTTP server. This have not yet implemented. fopen() DOESN'T WORK after EthernetInterface::connect() is called as using mbed-os 5.4~. See also https://os.mbed.com/questions/80658/HardFault-occurs-when-fopen-is-called-af/ or https://github.com/ARMmbed/mbed-os/issues/6578 and https://github.com/ARMmbed/mbed-os/issues/6624
Fork of HTTP_SERVER by
handlers/FileHandler.h
- Committer:
- aktk
- Date:
- 2018-03-23
- Revision:
- 18:ad5c461905bd
- Parent:
- 17:ce5845164001
File content as of revision 18:ad5c461905bd:
/*FileHandler.h*/ #ifndef FILE_HANDLER_H #define FILE_HANDLER_H #include "mbed.h" #include "string.h" #include <stdlib.h> extern LocalFileSystem local; using namespace std; class FileHandler { public: FileHandler(); ~FileHandler(); FILE* open(const char*, const char*); int close(); virtual int getc(); bool arrival(); bool atEOF(); bool hasError(); char *getFullpath(); char *getFilename(); char *getSuffix(); int getFileSize(); private: FILE *fp; char *fullpath; char *filename; char *suffix; char content_buffer[1024]; int file_size; }; #endif