Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of lwip by
HTTPLog.h
00001 #ifndef HTTPLOG_H 00002 #define HTTPLOG_H 00003 00004 #include "HTTPServer.h" 00005 00006 class HTTPLog : public HTTPHandler { 00007 public: 00008 HTTPLog(const char *prefix) : HTTPHandler(prefix) {} 00009 HTTPLog(HTTPServer *server, const char *prefix) : HTTPHandler(prefix) { server->addHandler(this); } 00010 00011 private: 00012 virtual HTTPHandle action(HTTPConnection *con) const { 00013 struct ip_addr ip = con->pcb()->remote_ip; 00014 printf("%hhu.%hhu.%hhu.%hhu %s %s", (ip.addr)&0xFF, (ip.addr>>8)&0xFF, (ip.addr>>16)&0xFF, (ip.addr>>24)&0xFF, (con->getType() == POST? "POST" : "GET"), con->getURL()); 00015 return HTTP_AddFields; 00016 } 00017 }; 00018 00019 #endif
Generated on Tue Jul 12 2022 16:07:04 by
1.7.2
