diff options
author | Vasil Dimov <vd@FreeBSD.org> | 2021-05-28 15:37:43 +0200 |
---|---|---|
committer | Vasil Dimov <vd@FreeBSD.org> | 2023-08-25 14:42:07 +0200 |
commit | 5086a99b84367a45706af7197da1016dd966e6d9 (patch) | |
tree | b15f4a845fc633daa29e85f2bc1857d5e431776f /src/test/util | |
parent | 7829272f7826511241defd34954e6040ea963f07 (diff) |
net: remove Sock default constructor, it's not necessary
Diffstat (limited to 'src/test/util')
-rw-r--r-- | src/test/util/net.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/test/util/net.h b/src/test/util/net.h index b2f6ebb163..403d0ed0ea 100644 --- a/src/test/util/net.h +++ b/src/test/util/net.h @@ -106,10 +106,10 @@ constexpr auto ALL_NETWORKS = std::array{ class StaticContentsSock : public Sock { public: - explicit StaticContentsSock(const std::string& contents) : m_contents{contents} + explicit StaticContentsSock(const std::string& contents) + : Sock{INVALID_SOCKET}, + m_contents{contents} { - // Just a dummy number that is not INVALID_SOCKET. - m_socket = INVALID_SOCKET - 1; } ~StaticContentsSock() override { m_socket = INVALID_SOCKET; } @@ -192,6 +192,11 @@ public: return true; } + bool IsConnected(std::string&) const override + { + return true; + } + private: const std::string m_contents; mutable size_t m_consumed{0}; |