TimeHandler test program for the HTTPServer

Dependencies:   EthernetNetIf mbed HTTPServer

Committer:
rinosh2
Date:
Thu Feb 03 17:51:51 2011 +0000
Revision:
0:b37980ea1c2f
Test version

Who changed what in which revision?

UserRevisionLine numberNew contents of line
rinosh2 0:b37980ea1c2f 1 #ifndef TIME_HANDLER_H
rinosh2 0:b37980ea1c2f 2 #define TIME_HANDLER_H
rinosh2 0:b37980ea1c2f 3
rinosh2 0:b37980ea1c2f 4 #include "../HTTPRequestHandler.h"
rinosh2 0:b37980ea1c2f 5
rinosh2 0:b37980ea1c2f 6 class TimeHandler : public HTTPRequestHandler
rinosh2 0:b37980ea1c2f 7 {
rinosh2 0:b37980ea1c2f 8 public:
rinosh2 0:b37980ea1c2f 9 TimeHandler(const char* rootPath, const char* path, TCPSocket* pTCPSocket);
rinosh2 0:b37980ea1c2f 10 virtual ~TimeHandler();
rinosh2 0:b37980ea1c2f 11
rinosh2 0:b37980ea1c2f 12 //protected:
rinosh2 0:b37980ea1c2f 13 static inline HTTPRequestHandler* inst(const char* rootPath, const char* path, TCPSocket* pTCPSocket) { return new TimeHandler(rootPath, path, pTCPSocket); } //if we ever could do static virtual functions, this would be one
rinosh2 0:b37980ea1c2f 14
rinosh2 0:b37980ea1c2f 15 virtual void doGet();
rinosh2 0:b37980ea1c2f 16 virtual void doPost();
rinosh2 0:b37980ea1c2f 17 virtual void doHead();
rinosh2 0:b37980ea1c2f 18
rinosh2 0:b37980ea1c2f 19 virtual void onReadable(); //Data has been read
rinosh2 0:b37980ea1c2f 20 virtual void onWriteable(); //Data has been written & buf is free
rinosh2 0:b37980ea1c2f 21 virtual void onClose(); //Connection is closing
rinosh2 0:b37980ea1c2f 22 };
rinosh2 0:b37980ea1c2f 23
rinosh2 0:b37980ea1c2f 24 #endif