Class Server¶
Defined in File server.h
Class Documentation¶
-
class
kiwix
::
Server
¶ Public Functions
-
Server
(Library *library, NameMapper *nameMapper = nullptr)¶ The default constructor.
- Parameters
library – The library to serve.
-
virtual
~Server
()¶
-
bool
start
()¶ Serve the content.
-
void
stop
()¶ Stop the daemon.
-
void
setRoot
(const std::string &root)¶
-
inline void
setAddress
(const std::string &addr)¶
-
inline void
setPort
(int port)¶
-
inline void
setNbThreads
(int threads)¶
-
inline void
setVerbose
(bool verbose)¶
-
inline void
setIndexTemplateString
(const std::string &indexTemplateString)¶
-
inline void
setTaskbar
(bool withTaskbar, bool withLibraryButton)¶
-
inline void
setBlockExternalLinks
(bool blockExternalLinks)¶
Protected Attributes
-
NameMapper *
mp_nameMapper
¶
-
std::string
m_root
= ""¶
-
std::string
m_addr
= ""¶
-
std::string
m_indexTemplateString
= ""¶
-
int
m_port
= 80¶
-
int
m_nbThreads
= 1¶
-
bool
m_verbose
= false¶
-
bool
m_withTaskbar
= true¶
-
bool
m_withLibraryButton
= true¶
-
bool
m_blockExternalLinks
= false¶
-
std::unique_ptr<InternalServer>
mp_server
¶
-