|
MOOS 0.2375
|
#include <HTTPConnection.h>

Classes | |
| struct | HTTPRequest |
Public Member Functions | |
| CHTTPConnection (XPCTcpSocket *pNewSocket, CMOOSCommClient *pMOOSComms, CMOOSLock *pMOOSCommsLock) | |
| bool | Run () |
| bool | HasCompleted () |
Static Public Member Functions | |
| static bool | _CB (void *pParam) |
Protected Member Functions | |
| bool | Serve () |
| bool | MakeWebPage () |
| bool | SendHeader () |
| bool | SendFailureHeader () |
| bool | SendWebPage () |
| bool | HandlePoke (std::string sPokeURL) |
| bool | BuildSingleVariableWebPageContents (std::ostringstream &wp, MOOSMSG_LIST &MsgList) |
| bool | BuildFullDBWebPageContents (std::ostringstream &wp, MOOSMSG_LIST &MsgList) |
| bool | ReadRequest () |
| bool | ReadLine (std::string &) |
| void | SendLine (std::string sLine) |
| void | SendString (std::string sLine) |
Protected Attributes | |
| std::string | m_sWebPage |
| CMOOSThread | m_ServeThread |
| XPCTcpSocket * | m_pSocket |
| std::string | m_sFocusVariable |
| HTTPRequest | m_Request |
| CMOOSCommClient * | m_pMOOSComms |
| CMOOSLock * | m_pMOOSCommsLock |
Definition at line 19 of file HTTPConnection.h.
| CHTTPConnection::CHTTPConnection | ( | XPCTcpSocket * | pNewSocket, |
| CMOOSCommClient * | pMOOSComms, | ||
| CMOOSLock * | pMOOSCommsLock | ||
| ) |
simple constructor
Definition at line 94 of file HTTPConnection.cpp.
| static bool CHTTPConnection::_CB | ( | void * | pParam | ) | [inline, static] |
call back to allow Serve to run in MOOSThread
Definition at line 135 of file HTTPConnection.h.
| bool CHTTPConnection::BuildFullDBWebPageContents | ( | std::ostringstream & | wp, |
| MOOSMSG_LIST & | MsgList | ||
| ) | [protected] |
build we page of whole DB
Definition at line 492 of file HTTPConnection.cpp.
| bool CHTTPConnection::BuildSingleVariableWebPageContents | ( | std::ostringstream & | wp, |
| MOOSMSG_LIST & | MsgList | ||
| ) | [protected] |
Definition at line 430 of file HTTPConnection.cpp.
| bool CHTTPConnection::HandlePoke | ( | std::string | sPokeURL | ) | [protected] |
respond to someone putting data
Definition at line 307 of file HTTPConnection.cpp.
| bool CHTTPConnection::HasCompleted | ( | ) |
has the connection terminated?
Definition at line 605 of file HTTPConnection.cpp.
| bool CHTTPConnection::MakeWebPage | ( | ) | [protected] |
Makes a webpage
Definition at line 357 of file HTTPConnection.cpp.
| bool CHTTPConnection::ReadLine | ( | std::string & | sLine | ) | [protected] |
read a single line from client
Definition at line 235 of file HTTPConnection.cpp.
| bool CHTTPConnection::ReadRequest | ( | ) | [protected] |
read a request header
Definition at line 158 of file HTTPConnection.cpp.
| bool CHTTPConnection::Run | ( | ) |
start the connection processing...
Definition at line 102 of file HTTPConnection.cpp.
| bool CHTTPConnection::SendFailureHeader | ( | ) | [protected] |
Sends a 404 error header
Definition at line 587 of file HTTPConnection.cpp.
| bool CHTTPConnection::SendHeader | ( | ) | [protected] |
Sends an all OK header detailing length of page to follow
Definition at line 596 of file HTTPConnection.cpp.
| void CHTTPConnection::SendLine | ( | std::string | sLine | ) | [protected] |
lower level send string with appended
Definition at line 220 of file HTTPConnection.cpp.
| void CHTTPConnection::SendString | ( | std::string | sLine | ) | [protected] |
lower level send string (no line feed cr appended)
Definition at line 228 of file HTTPConnection.cpp.
| bool CHTTPConnection::SendWebPage | ( | ) | [protected] |
Send the webpage itself
Definition at line 276 of file HTTPConnection.cpp.
| bool CHTTPConnection::Serve | ( | ) | [protected] |
main sequence of response actions
Definition at line 112 of file HTTPConnection.cpp.
CMOOSCommClient* CHTTPConnection::m_pMOOSComms [protected] |
pointer to a COmms Client (The DB Connection is shared between all HTTPConnections)
Definition at line 184 of file HTTPConnection.h.
CMOOSLock* CHTTPConnection::m_pMOOSCommsLock [protected] |
pointer to a lock which provides protected access to the MOOS comms client object
Definition at line 187 of file HTTPConnection.h.
XPCTcpSocket* CHTTPConnection::m_pSocket [protected] |
Socket which hold the Connection
Definition at line 175 of file HTTPConnection.h.
HTTPRequest CHTTPConnection::m_Request [protected] |
A HTTP Request instantiation
Definition at line 181 of file HTTPConnection.h.
CMOOSThread CHTTPConnection::m_ServeThread [protected] |
Thread object which runs the servicing sequence of commands
Definition at line 173 of file HTTPConnection.h.
std::string CHTTPConnection::m_sFocusVariable [protected] |
name of focus variable (empty for whole site request)
Definition at line 178 of file HTTPConnection.h.
std::string CHTTPConnection::m_sWebPage [protected] |
string containing the webpage iteself
Definition at line 171 of file HTTPConnection.h.
1.7.4