Cuberite
A lightweight, fast and extensible game server for Minecraft
|
#include <HTTPServer.h>
Classes | |
class | cCallbacks |
Public Member Functions | |
cHTTPServer (void) | |
bool | Initialize (void) |
Initializes the server - reads the cert files etc. More... | |
bool | Start (cCallbacks &a_Callbacks, const AStringVector &a_Ports) |
Starts the server and assigns the callbacks to use for incoming requests. More... | |
void | Stop (void) |
Stops the server, drops all current connections. More... | |
virtual | ~cHTTPServer () |
Protected Member Functions | |
void | NewRequest (cHTTPServerConnection &a_Connection, cHTTPIncomingRequest &a_Request) |
Called by cHTTPServerConnection when it finishes parsing the request header. More... | |
cTCPLink::cCallbacksPtr | OnIncomingConnection (const AString &a_RemoteIPAddress, UInt16 a_RemotePort) |
Called by cHTTPServerListenCallbacks when there's a new incoming connection. More... | |
void | RequestBody (cHTTPServerConnection &a_Connection, cHTTPIncomingRequest &a_Request, const void *a_Data, size_t a_Size) |
Called by cHTTPConenction when it receives more data for the request body. More... | |
void | RequestFinished (cHTTPServerConnection &a_Connection, cHTTPIncomingRequest &a_Request) |
Called by cHTTPServerConnection when it detects that the request has finished (all of its body has been received) More... | |
Protected Attributes | |
cCallbacks * | m_Callbacks |
The callbacks to call for various events. More... | |
cServerHandlePtrs | m_ServerHandles |
The cNetwork API handle for the listening socket. More... | |
std::shared_ptr< const cSslConfig > | m_SslConfig |
Configuration for server ssl connections. More... | |
Friends | |
class | cHTTPServerConnection |
class | cHTTPServerListenCallbacks |
class | cSslHTTPServerConnection |
Definition at line 30 of file HTTPServer.h.
cHTTPServer::cHTTPServer | ( | void | ) |
Definition at line 67 of file HTTPServer.cpp.
|
virtual |
Definition at line 76 of file HTTPServer.cpp.
bool cHTTPServer::Initialize | ( | void | ) |
Initializes the server - reads the cert files etc.
Definition at line 85 of file HTTPServer.cpp.
|
protected |
Called by cHTTPServerConnection when it finishes parsing the request header.
Definition at line 208 of file HTTPServer.cpp.
|
protected |
Called by cHTTPServerListenCallbacks when there's a new incoming connection.
Returns the connection instance to be used as the cTCPLink callbacks.
Definition at line 189 of file HTTPServer.cpp.
|
protected |
Called by cHTTPConenction when it receives more data for the request body.
May be called multiple times for a single request.
Definition at line 217 of file HTTPServer.cpp.
|
protected |
Called by cHTTPServerConnection when it detects that the request has finished (all of its body has been received)
Definition at line 226 of file HTTPServer.cpp.
bool cHTTPServer::Start | ( | cCallbacks & | a_Callbacks, |
const AStringVector & | a_Ports | ||
) |
Starts the server and assigns the callbacks to use for incoming requests.
Definition at line 134 of file HTTPServer.cpp.
void cHTTPServer::Stop | ( | void | ) |
Stops the server, drops all current connections.
Definition at line 176 of file HTTPServer.cpp.
|
friend |
Definition at line 63 of file HTTPServer.h.
|
friend |
Definition at line 65 of file HTTPServer.h.
|
friend |
Definition at line 64 of file HTTPServer.h.
|
protected |
The callbacks to call for various events.
Definition at line 71 of file HTTPServer.h.
|
protected |
The cNetwork API handle for the listening socket.
Definition at line 68 of file HTTPServer.h.
|
protected |
Configuration for server ssl connections.
Definition at line 74 of file HTTPServer.h.