Skip to content
Snippets Groups Projects
Commit 1ed36a4a authored by Carsten Patzke's avatar Carsten Patzke
Browse files

[Consumer] Removed const noexcept on GetData()

parent 9e6c89ef
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,7 @@ namespace asapo {
class NetClient {
public:
virtual Error GetData(const FileInfo* info, FileData* data) const noexcept = 0;
virtual Error GetData(const FileInfo* info, FileData* data) = 0;
virtual ~NetClient() = default;
};
......
......@@ -84,8 +84,7 @@ Error TcpClient::ReceiveData(SocketDescriptor sd, const FileInfo* info, FileData
return err;
}
Error TcpClient::GetData(const FileInfo* info, FileData* data) const noexcept {
Error TcpClient::GetData(const FileInfo* info, FileData* data) {
Error err;
bool reused;
auto sd = connection_pool__->GetFreeConnection(info->source, &reused, &err);
......@@ -101,4 +100,4 @@ Error TcpClient::GetData(const FileInfo* info, FileData* data) const noexcept {
return ReceiveData(sd, info, data);
}
}
\ No newline at end of file
}
#ifndef ASAPO_TCP_CLIENT_H
#define ASAPO_TCP_CLIENT_H
#ifndef ASAPO_CONSUMER_TCP_CLIENT_H
#define ASAPO_CONSUMER_TCP_CLIENT_H
#include "net_client.h"
#include "io/io.h"
......@@ -10,7 +10,7 @@ namespace asapo {
class TcpClient : public NetClient {
public:
explicit TcpClient();
Error GetData(const FileInfo* info, FileData* data) const noexcept override;
Error GetData(const FileInfo* info, FileData* data) override;
std::unique_ptr<IO> io__;
std::unique_ptr<TcpConnectionPool> connection_pool__;
private:
......@@ -23,4 +23,4 @@ class TcpClient : public NetClient {
}
#endif //ASAPO_TCP_CLIENT_H
#endif //ASAPO_CONSUMER_TCP_CLIENT_H
......@@ -12,7 +12,7 @@ namespace asapo {
class MockNetClient : public asapo::NetClient {
public:
Error GetData(const FileInfo* info, FileData* data) const noexcept override {
Error GetData(const FileInfo* info, FileData* data) override {
return Error(GetData_t(info, data));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment