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"));
|
||||
});
|
||||
}
|
||||
|
||||
int HttpServer::getTimeoutSecs()
|
||||
{
|
||||
return _timeoutSecs;
|
||||
}
|
||||
|
||||
} // namespace ix
|
||||
|
@ -40,6 +40,7 @@ namespace ix
|
||||
|
||||
void makeDebugServer();
|
||||
|
||||
int getTimeoutSecs();
|
||||
private:
|
||||
// Member variables
|
||||
OnConnectionCallback _onConnectionCallback;
|
||||
|
@ -461,4 +461,29 @@ namespace ix
|
||||
// so wake up the thread responsible for that
|
||||
_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
|
||||
|
@ -60,6 +60,11 @@ namespace ix
|
||||
|
||||
void setTLSOptions(const SocketTLSOptions& socketTLSOptions);
|
||||
|
||||
int getPort();
|
||||
std::string getHost();
|
||||
int getBacklog();
|
||||
std::size_t getMaxConnections();
|
||||
int getAddressFamily();
|
||||
protected:
|
||||
// Logging
|
||||
void logError(const std::string& str);
|
||||
|
@ -211,4 +211,19 @@ namespace ix
|
||||
start();
|
||||
return true;
|
||||
}
|
||||
|
||||
int WebSocketServer::getHandshakeTimeoutSecs()
|
||||
{
|
||||
return _handshakeTimeoutSecs;
|
||||
}
|
||||
|
||||
bool WebSocketServer::isPongEnabled()
|
||||
{
|
||||
return _enablePong;
|
||||
}
|
||||
|
||||
bool WebSocketServer::isPerMessageDeflateEnabled()
|
||||
{
|
||||
return _enablePerMessageDeflate;
|
||||
}
|
||||
} // namespace ix
|
||||
|
@ -52,6 +52,9 @@ namespace ix
|
||||
|
||||
const static int kDefaultHandShakeTimeoutSecs;
|
||||
|
||||
int getHandshakeTimeoutSecs();
|
||||
bool isPongEnabled();
|
||||
bool isPerMessageDeflateEnabled();
|
||||
private:
|
||||
// Member variables
|
||||
int _handshakeTimeoutSecs;
|
||||
|
Loading…
Reference in New Issue
Block a user