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
Diff: HTTP_SERVER.cpp
- Revision:
- 17:ce5845164001
- Parent:
- 16:c3920b5b8572
diff -r c3920b5b8572 -r ce5845164001 HTTP_SERVER.cpp --- a/HTTP_SERVER.cpp Mon Mar 19 09:25:32 2018 +0000 +++ b/HTTP_SERVER.cpp Fri Mar 23 07:39:28 2018 +0000 @@ -22,10 +22,10 @@ UNDERFLOW means that there is a value which is too fine(or high definition) to express. (Why was the type char*?) -char req_buf[1024] was not uesed anywhere... +(char)req_buf[1024] was not uesed anywhere... so it was deleted. -bool keep-alive was also not uesed so deleted it. +(bool)keep-alive was also not uesed so deleted it. After doing those above, the error massage was DERAYED but it even now occur. @@ -100,6 +100,7 @@ printf("(HTTP_SERVER) IP Address is %s\r\n", net->get_ip_address()); } + ftest.func(); // TCP Socket setup // To open Server-side PORT if(server.open(net) < 0) { @@ -229,7 +230,7 @@ // file calibration DEBUG_PRINT_LINE("file opening"); DEBUG_PRINT_LINE("filepath: %s", filepath); - fhndl.open(filepath,"rb");///////////////////////////////////////////////////////////////////////////////////////////////////////////////// + fhndl.open(filepath,"rb"); if(fhndl.arrival()) { msger.setStatusLine(200, "OK"); if(msger.setHeaderField("Content-Length", fhndl.getFileSize())) DEBUG_PRINT_LINE("buffer over flow @ ResponseMessenger");