ソースの整理中ですが、利用はできます。 大きなファイルはできないかもしれません。

Dependencies:   EthernetInterface HttpServer TextLCD expatlib mbed-rpc mbed-rtos mbed Socket lwip-eth lwip-sys lwip

Fork of giken9_HTMLServer_Sample by Yasushi TAUCHI

Embed: (wiki syntax)

« Back to documentation index

HTTPRequestHandler Class Reference

HTTPRequestHandler Class Reference

HTTP Server's generic request handler. More...

#include <HTTPRequestHandler.h>

Inherited by FSHandler, RPCHandler, and SimpleHandler.

Public Member Functions

 HTTPRequestHandler (const char *rootPath, const char *path, TCPSocketConnection *pTCPSocketConnection)
 Instantiated by the HTTP Server.
virtual void close ()

Protected Member Functions

char * getAddress (void)
 void HTTPRequestHandler::onTCPSocketEvent(TCPSocketEvent e) { printf("\r\nEvent %d in HTTPRequestHandler\r\n", e); printf("\r\n+++(HTTPRequestHandler)Event in HTTPRequestHandler\r\n");

Detailed Description

HTTP Server's generic request handler.

Definition at line 43 of file HTTPRequestHandler.h.


Constructor & Destructor Documentation

HTTPRequestHandler ( const char *  rootPath,
const char *  path,
TCPSocketConnection pTCPSocketConnection 
)

Instantiated by the HTTP Server.

Definition at line 33 of file HTTPRequestHandler.cpp.


Member Function Documentation

void close (  ) [virtual]

m_watchdog.detach();

Definition at line 64 of file HTTPRequestHandler.cpp.

char * getAddress ( void   ) [protected]

void HTTPRequestHandler::onTCPSocketEvent(TCPSocketEvent e) { printf("\r\nEvent %d in HTTPRequestHandler\r\n", e); printf("\r\n+++(HTTPRequestHandler)Event in HTTPRequestHandler\r\n");

if(m_closed) { printf("\r\n+++(HTTPRequestHandler)WARN: Discarded\r\n"); return; }

switch(e) { case TCPSOCKET_READABLE: resetTimeout(); onReadable(); break; case TCPSOCKET_WRITEABLE: resetTimeout(); onWriteable(); break; case TCPSOCKET_CONTIMEOUT: case TCPSOCKET_CONRST: case TCPSOCKET_CONABRT: case TCPSOCKET_ERROR: case TCPSOCKET_DISCONNECTED: DBG("\r\nConnection error in handler\r\n"); close(); break; } }

Definition at line 399 of file HTTPRequestHandler.cpp.