Socket‐based HTTP server that accepts connections and dispatches requests to worker threads.
Synopsis
Declared in <httpserver.h>
class HTTPServer;
Type Aliases
Name |
Description |
Each connection is assigned an unique id of this type. |
Member Functions
Name |
Description |
|
Construct a server that dispatches each parsed request to the given handler. |
|
Destroy the server, asserting that all threads, connections and listeners were stopped. |
Bind to a new address:port, start listening and add the listen socket to |
|
Force‐remove all remaining clients from m_connected without waiting for graceful disconnection. Must only be called after JoinSocketsThreads(). |
|
Start disconnecting clients when possible in the I/O loop |
|
Get the number of HTTPRemoteClients we are connected to |
|
Get the number of sockets the server is bound to and listening on |
|
Parse the user's ‐rpcallowip settings and populate m_allow_subnets |
|
Stop network activity |
|
Join (wait for) the threads started by |
|
Set the maximum amount of connected HTTPClients (‐rpcmaxconnections) |
|
Update the request handler method. Used for shutdown to reject new requests. |
|
Set the idle client timeout (‐rpcservertimeout) |
|
Start the necessary threads for sockets IO. |
|
Stop accepting new connections in the I/O loop. Must be called first in StopHTTPServer() before DisconnectAllClients(). A connection accepted after the "wait for 0 connections" loop exits would remain in m_connected when the destructor is called. |
|
Stop listening by closing all listening sockets. |
Created with MrDocs