![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
this will take a image from C328 serial camera and store those images in mbed flash as html and this html page is uploaded into the server at ip:192.168.1.2
lwip/HTTPServer/HTTPLog.h@0:e1a0471e5ffb, 2010-12-15 (annotated)
- Committer:
- mitesh2patel
- Date:
- Wed Dec 15 15:01:56 2010 +0000
- Revision:
- 0:e1a0471e5ffb
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mitesh2patel | 0:e1a0471e5ffb | 1 | #ifndef HTTPLOG_H |
mitesh2patel | 0:e1a0471e5ffb | 2 | #define HTTPLOG_H |
mitesh2patel | 0:e1a0471e5ffb | 3 | |
mitesh2patel | 0:e1a0471e5ffb | 4 | #include "HTTPServer.h" |
mitesh2patel | 0:e1a0471e5ffb | 5 | |
mitesh2patel | 0:e1a0471e5ffb | 6 | class HTTPLog : public HTTPHandler { |
mitesh2patel | 0:e1a0471e5ffb | 7 | public: |
mitesh2patel | 0:e1a0471e5ffb | 8 | HTTPLog(const char *prefix) : HTTPHandler(prefix) {} |
mitesh2patel | 0:e1a0471e5ffb | 9 | HTTPLog(HTTPServer *server, const char *prefix) : HTTPHandler(prefix) { server->addHandler(this); } |
mitesh2patel | 0:e1a0471e5ffb | 10 | |
mitesh2patel | 0:e1a0471e5ffb | 11 | private: |
mitesh2patel | 0:e1a0471e5ffb | 12 | virtual HTTPHandle action(HTTPConnection *con) const { |
mitesh2patel | 0:e1a0471e5ffb | 13 | struct ip_addr ip = con->pcb()->remote_ip; |
mitesh2patel | 0:e1a0471e5ffb | 14 | 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()); |
mitesh2patel | 0:e1a0471e5ffb | 15 | return HTTP_AddFields; |
mitesh2patel | 0:e1a0471e5ffb | 16 | } |
mitesh2patel | 0:e1a0471e5ffb | 17 | }; |
mitesh2patel | 0:e1a0471e5ffb | 18 | |
mitesh2patel | 0:e1a0471e5ffb | 19 | #endif |