mirror of
https://github.com/Telecominfraproject/wlan-cloud-lib-poco.git
synced 2025-11-02 03:27:56 +00:00
add separate accessors and mutators for connect, send and receive tim… (#3476)
* add separate accessors and mutators for connect, send and receive timeouts * implement timeout methods outside of class declaration to conform to existing code structure * Update HTTPSession.h Co-authored-by: bfoster <bfoster@malwarebytes.com> Co-authored-by: Aleksandar Fabijanic <aleks-f@users.noreply.github.com>
This commit is contained in:
@@ -61,6 +61,24 @@ public:
|
||||
Poco::Timespan getTimeout() const;
|
||||
/// Returns the timeout for the HTTP session.
|
||||
|
||||
void setConnectTimeout(const Poco::Timespan& timeout);
|
||||
/// Sets the connect timeout.
|
||||
|
||||
Poco::Timespan getConnectTimeout() const;
|
||||
/// Gets the connect timeout.
|
||||
|
||||
void setSendTimeout(const Poco::Timespan& timeout);
|
||||
/// Sets the send timeout.
|
||||
|
||||
Poco::Timespan getSendTimeout() const;
|
||||
/// Gets the send timeout.
|
||||
|
||||
void setReceiveTimeout(const Poco::Timespan& timeout);
|
||||
/// Sets the receive timeout.
|
||||
|
||||
Poco::Timespan getReceiveTimeout() const;
|
||||
/// Gets the receive timeout.
|
||||
|
||||
bool connected() const;
|
||||
/// Returns true if the underlying socket is connected.
|
||||
|
||||
@@ -225,6 +243,42 @@ inline Poco::Timespan HTTPSession::getTimeout() const
|
||||
}
|
||||
|
||||
|
||||
inline void HTTPSession::setConnectTimeout(const Poco::Timespan& timeout)
|
||||
{
|
||||
_connectionTimeout = timeout;
|
||||
}
|
||||
|
||||
|
||||
inline Poco::Timespan HTTPSession::getConnectTimeout() const
|
||||
{
|
||||
return _connectionTimeout;
|
||||
}
|
||||
|
||||
|
||||
inline void HTTPSession::setSendTimeout(const Poco::Timespan& timeout)
|
||||
{
|
||||
_sendTimeout = timeout;
|
||||
}
|
||||
|
||||
|
||||
inline Poco::Timespan HTTPSession::getSendTimeout() const
|
||||
{
|
||||
return _sendTimeout;
|
||||
}
|
||||
|
||||
|
||||
inline void HTTPSession::setReceiveTimeout(const Poco::Timespan& timeout)
|
||||
{
|
||||
_receiveTimeout = timeout;
|
||||
}
|
||||
|
||||
|
||||
inline Poco::Timespan HTTPSession::getReceiveTimeout() const
|
||||
{
|
||||
return _receiveTimeout;
|
||||
}
|
||||
|
||||
|
||||
inline StreamSocket& HTTPSession::socket()
|
||||
{
|
||||
return _socket;
|
||||
|
||||
Reference in New Issue
Block a user