mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-04 18:22:57 +02:00
net: add new method Sock::Listen() that wraps listen()
This will help to increase `Sock` usage and make more code mockable.
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user