Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add separate accessors and mutators for connect, send and receive tim… #3476

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions Net/include/Poco/Net/HTTPSession.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,24 @@ class Net_API HTTPSession
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.

Expand Down Expand Up @@ -221,6 +239,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;
Expand Down