mirror of https://github.com/kiwix/libkiwix.git
Merge pull request #236 from kiwix/return-port-kiwix-serve
kiwix local server port can be set at the constructor
This commit is contained in:
commit
f41155e060
|
@ -9,12 +9,13 @@ namespace kiwix {
|
|||
class KiwixServe
|
||||
{
|
||||
public:
|
||||
KiwixServe();
|
||||
KiwixServe(int port = 8181);
|
||||
~KiwixServe();
|
||||
|
||||
void run();
|
||||
void shutDown();
|
||||
bool isRunning();
|
||||
int getPort() { return m_port; }
|
||||
|
||||
private:
|
||||
std::unique_ptr<Subprocess> mp_kiwixServe;
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
namespace kiwix {
|
||||
|
||||
KiwixServe::KiwixServe() : m_port(8181)
|
||||
KiwixServe::KiwixServe(int port) : m_port(port)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue