Interface to a HttpServer port. More...
#include <Devices/HTTPServer.H>
Public Member Functions | |
HttpServer (OptionManager &mgr, const std::string &descrName="HttpServer Port", const std::string &tagName="HttpServerPort") | |
Constructor. | |
~HttpServer (void) | |
destructor | |
int | acceptConn () |
Accept a connection and return the connection fd. | |
int | writeData (int clientFd, std::string &msg) |
write a string to the client fd | |
Protected Member Functions | |
void | start1 () |
open the port and get started | |
void | stop2 () |
close the port and get stopped | |
Protected Attributes | |
OModelParam< unsigned int > | itsPort |
Resolve hostname to ip address. |
Interface to a HttpServer port.
The socket will be open at start() time; see ModelComponent.H for details.
Definition at line 58 of file HTTPServer.H.
HttpServer::HttpServer | ( | OptionManager & | mgr, | |
const std::string & | descrName = "HttpServer Port" , |
|||
const std::string & | tagName = "HttpServerPort" | |||
) |
Constructor.
Definition at line 68 of file HTTPServer.C.
HttpServer::~HttpServer | ( | void | ) |
destructor
Definition at line 79 of file HTTPServer.C.
int HttpServer::acceptConn | ( | ) |
Accept a connection and return the connection fd.
Definition at line 129 of file HTTPServer.C.
void HttpServer::start1 | ( | ) | [protected, virtual] |
open the port and get started
Reimplemented from ModelComponent.
Definition at line 88 of file HTTPServer.C.
References OModelParam< T >::getVal(), and itsPort.
void HttpServer::stop2 | ( | ) | [protected, virtual] |
close the port and get stopped
Reimplemented from ModelComponent.
Definition at line 124 of file HTTPServer.C.
int HttpServer::writeData | ( | int | clientFd, | |
std::string & | msg | |||
) |
write a string to the client fd
Definition at line 137 of file HTTPServer.C.
OModelParam<unsigned int> HttpServer::itsPort [protected] |
Resolve hostname to ip address.
The port we listen on
Definition at line 76 of file HTTPServer.H.
Referenced by start1().