diff options
Diffstat (limited to 'libtransport/includes/hicn/transport/http/client_connection.h')
-rw-r--r-- | libtransport/includes/hicn/transport/http/client_connection.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libtransport/includes/hicn/transport/http/client_connection.h b/libtransport/includes/hicn/transport/http/client_connection.h index 262756a09..d5edf6cd0 100644 --- a/libtransport/includes/hicn/transport/http/client_connection.h +++ b/libtransport/includes/hicn/transport/http/client_connection.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2020 Cisco and/or its affiliates. + * Copyright (c) 2021 Cisco and/or its affiliates. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at: @@ -31,7 +31,7 @@ namespace http { using namespace interface; using namespace core; -class HTTPClientConnection { +class HTTPClientConnection : private utils::NonCopyable { static constexpr uint32_t max_buffer_capacity = 64 * 1024; public: @@ -39,7 +39,7 @@ class HTTPClientConnection { public: virtual void onBytesReceived(std::unique_ptr<utils::MemBuf> &&buffer) = 0; virtual void onSuccess(std::size_t bytes) = 0; - virtual void onError(const std::error_code ec) = 0; + virtual void onError(const std::error_code &ec) = 0; }; enum class RC : uint32_t { DOWNLOAD_FAILED, DOWNLOAD_SUCCESS }; @@ -68,7 +68,7 @@ class HTTPClientConnection { HTTPClientConnection &setTimeout(const std::chrono::seconds &timeout); - HTTPClientConnection &setCertificate(const std::string &cert_path); + HTTPClientConnection &setVerifier(std::shared_ptr<auth::Verifier> verifier); private: class Implementation; @@ -77,4 +77,4 @@ class HTTPClientConnection { } // end namespace http -} // end namespace transport
\ No newline at end of file +} // end namespace transport |