diff options
author | Vasil Dimov <vd@FreeBSD.org> | 2021-04-13 16:43:04 +0200 |
---|---|---|
committer | Vasil Dimov <vd@FreeBSD.org> | 2022-05-18 16:40:13 +0200 |
commit | b2733ab6a85b234a88b83bdc77a0d043e18385b3 (patch) | |
tree | 89ebd1d42740c4923a7682b852668078136574dd /src/test/util/net.h | |
parent | 3ad7de225efce3e76530f56bee8a8f7a75ea0f3c (diff) | |
download | bitcoin-b2733ab6a85b234a88b83bdc77a0d043e18385b3.tar.xz |
net: add new method Sock::Listen() that wraps listen()
This will help to increase `Sock` usage and make more code mockable.
Diffstat (limited to 'src/test/util/net.h')
-rw-r--r-- | src/test/util/net.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/test/util/net.h b/src/test/util/net.h index 11202f0c38..9e3175e672 100644 --- a/src/test/util/net.h +++ b/src/test/util/net.h @@ -129,6 +129,8 @@ public: int Bind(const sockaddr*, socklen_t) const override { return 0; } + int Listen(int) const override { return 0; } + std::unique_ptr<Sock> Accept(sockaddr* addr, socklen_t* addr_len) const override { if (addr != nullptr) { |