diff options
Diffstat (limited to 'lib/httpserver/S3Client.h')
-rw-r--r-- | lib/httpserver/S3Client.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/httpserver/S3Client.h b/lib/httpserver/S3Client.h index 2d3f71cf..3681213b 100644 --- a/lib/httpserver/S3Client.h +++ b/lib/httpserver/S3Client.h @@ -36,7 +36,8 @@ class S3Client : mpSimulator(pSimulator), mHostName(rHostName), mAccessKey(rAccessKey), - mSecretKey(rSecretKey) + mSecretKey(rSecretKey), + mNetworkTimeout(30000) { } S3Client(std::string HostName, int Port, const std::string& rAccessKey, @@ -49,9 +50,11 @@ class S3Client { } HTTPResponse GetObject(const std::string& rObjectURI); + HTTPResponse HeadObject(const std::string& rObjectURI); HTTPResponse PutObject(const std::string& rObjectURI, IOStream& rStreamToSend, const char* pContentType = NULL); void CheckResponse(const HTTPResponse& response, const std::string& message) const; + int GetNetworkTimeout() const { return mNetworkTimeout; } private: HTTPServer* mpSimulator; @@ -59,6 +62,7 @@ class S3Client int mPort; std::auto_ptr<SocketStream> mapClientSocket; std::string mAccessKey, mSecretKey; + int mNetworkTimeout; // milliseconds HTTPResponse FinishAndSendRequest(HTTPRequest::Method Method, const std::string& rRequestURI, |