mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-08 11:44:14 +01:00
net: add new method Sock::Accept() that wraps accept()
This will help to increase `Sock` usage and make more code mockable.
This commit is contained in:
@@ -410,6 +410,8 @@ public:
|
||||
|
||||
int Connect(const sockaddr*, socklen_t) const override;
|
||||
|
||||
std::unique_ptr<Sock> Accept(sockaddr* addr, socklen_t* addr_len) const override;
|
||||
|
||||
int GetSockOpt(int level, int opt_name, void* opt_val, socklen_t* opt_len) const override;
|
||||
|
||||
bool Wait(std::chrono::milliseconds timeout, Event requested, Event* occurred = nullptr) const override;
|
||||
|
||||
Reference in New Issue
Block a user