Add getters (#327)
* Add getters for IXSocketServer class * Add getters for IXHttpServer class * Add getters for IXWebSocketServer class
This commit is contained in:
parent
e66437b560
commit
74bb85efe9
@ -226,4 +226,10 @@ namespace ix
|
|||||||
200, "OK", HttpErrorCode::Ok, headers, std::string("OK"));
|
200, "OK", HttpErrorCode::Ok, headers, std::string("OK"));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int HttpServer::getTimeoutSecs()
|
||||||
|
{
|
||||||
|
return _timeoutSecs;
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace ix
|
} // namespace ix
|
||||||
|
@ -40,6 +40,7 @@ namespace ix
|
|||||||
|
|
||||||
void makeDebugServer();
|
void makeDebugServer();
|
||||||
|
|
||||||
|
int getTimeoutSecs();
|
||||||
private:
|
private:
|
||||||
// Member variables
|
// Member variables
|
||||||
OnConnectionCallback _onConnectionCallback;
|
OnConnectionCallback _onConnectionCallback;
|
||||||
|
@ -461,4 +461,29 @@ namespace ix
|
|||||||
// so wake up the thread responsible for that
|
// so wake up the thread responsible for that
|
||||||
_conditionVariableGC.notify_one();
|
_conditionVariableGC.notify_one();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int SocketServer::getPort()
|
||||||
|
{
|
||||||
|
return _port;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string SocketServer::getHost()
|
||||||
|
{
|
||||||
|
return _host;
|
||||||
|
}
|
||||||
|
|
||||||
|
int SocketServer::getBacklog()
|
||||||
|
{
|
||||||
|
return _backlog;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::size_t SocketServer::getMaxConnections()
|
||||||
|
{
|
||||||
|
return _maxConnections;
|
||||||
|
}
|
||||||
|
|
||||||
|
int SocketServer::getAddressFamily()
|
||||||
|
{
|
||||||
|
return _addressFamily;
|
||||||
|
}
|
||||||
} // namespace ix
|
} // namespace ix
|
||||||
|
@ -60,6 +60,11 @@ namespace ix
|
|||||||
|
|
||||||
void setTLSOptions(const SocketTLSOptions& socketTLSOptions);
|
void setTLSOptions(const SocketTLSOptions& socketTLSOptions);
|
||||||
|
|
||||||
|
int getPort();
|
||||||
|
std::string getHost();
|
||||||
|
int getBacklog();
|
||||||
|
std::size_t getMaxConnections();
|
||||||
|
int getAddressFamily();
|
||||||
protected:
|
protected:
|
||||||
// Logging
|
// Logging
|
||||||
void logError(const std::string& str);
|
void logError(const std::string& str);
|
||||||
|
@ -211,4 +211,19 @@ namespace ix
|
|||||||
start();
|
start();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int WebSocketServer::getHandshakeTimeoutSecs()
|
||||||
|
{
|
||||||
|
return _handshakeTimeoutSecs;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool WebSocketServer::isPongEnabled()
|
||||||
|
{
|
||||||
|
return _enablePong;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool WebSocketServer::isPerMessageDeflateEnabled()
|
||||||
|
{
|
||||||
|
return _enablePerMessageDeflate;
|
||||||
|
}
|
||||||
} // namespace ix
|
} // namespace ix
|
||||||
|
@ -52,6 +52,9 @@ namespace ix
|
|||||||
|
|
||||||
const static int kDefaultHandShakeTimeoutSecs;
|
const static int kDefaultHandShakeTimeoutSecs;
|
||||||
|
|
||||||
|
int getHandshakeTimeoutSecs();
|
||||||
|
bool isPongEnabled();
|
||||||
|
bool isPerMessageDeflateEnabled();
|
||||||
private:
|
private:
|
||||||
// Member variables
|
// Member variables
|
||||||
int _handshakeTimeoutSecs;
|
int _handshakeTimeoutSecs;
|
||||||
|
Loading…
Reference in New Issue
Block a user