mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-08 19:53:27 +01:00
net: add new method Sock::GetSockName() that wraps getsockname()
This will help to increase `Sock` usage and make more code mockable.
This commit is contained in:
@@ -69,6 +69,8 @@ public:
|
||||
|
||||
int SetSockOpt(int level, int opt_name, const void* opt_val, socklen_t opt_len) const override;
|
||||
|
||||
int GetSockName(sockaddr* name, socklen_t* name_len) const override;
|
||||
|
||||
bool Wait(std::chrono::milliseconds timeout, Event requested, Event* occurred = nullptr) const override;
|
||||
|
||||
bool WaitMany(std::chrono::milliseconds timeout, EventsPerSock& events_per_sock) const override;
|
||||
|
||||
Reference in New Issue
Block a user