|
CMSDK 2.0.1
Cross-platform C++ base library and SDK for the Psyclone AIOS platform
|
Minimal HTTP server used by the unit tests: replies with a canned page. More...
#include <NetworkManager.h>
Public Member Functions | |
| HTTPTestServer () | |
| ~HTTPTestServer () | |
| virtual bool | receiveHTTPRequest (HTTPRequest *req, NetworkChannel *channel, uint64 conid) |
| Serve a test page for any request. | |
| Public Member Functions inherited from cmlabs::NetworkReceiver | |
| NetworkReceiver () | |
| virtual bool | receiveNetworkEvent (NetworkEvent *evt, NetworkChannel *channel, uint64 conid) |
| A connection lifecycle event occurred. | |
| virtual bool | receiveMessage (DataMessage *msg, NetworkChannel *channel, uint64 conid) |
| A binary DataMessage arrived. | |
| virtual bool | receiveTelnetLine (TelnetLine *line, NetworkChannel *channel, uint64 conid) |
| A Telnet line arrived. | |
| virtual bool | receiveHTTPReply (HTTPReply *reply, HTTPRequest *req, NetworkChannel *channel, uint64 conid) |
| An HTTP reply to an earlier async request arrived. | |
| virtual bool | receiveWebsocketData (WebsocketData *wsData, NetworkChannel *channel, uint64 conid) |
| A WebSocket message arrived. | |
Minimal HTTP server used by the unit tests: replies with a canned page.
Definition at line 112 of file NetworkManager.h.
| cmlabs::HTTPTestServer::HTTPTestServer | ( | ) |
Definition at line 2408 of file NetworkManager.cpp.
| cmlabs::HTTPTestServer::~HTTPTestServer | ( | ) |
Definition at line 2411 of file NetworkManager.cpp.
|
virtual |
Serve a test page for any request.
Reimplemented from cmlabs::NetworkReceiver.
Definition at line 2414 of file NetworkManager.cpp.
References cmlabs::HTTPReply::createPage(), cmlabs::utils::GetLocalIPAddress(), cmlabs::GetTimeNow(), HTTP_OK, and cmlabs::NetworkChannel::sendHTTPReply().