HomePhabricator

net: extend Sock::Wait() to report a timeout

Description

net: extend Sock::Wait() to report a timeout

Summary:
Previously Sock::Wait() would not have signaled to the caller whether a timeout or one of the requested events occurred since that was not needed by any of the callers.

Such functionality will be needed in the I2P implementation, thus extend the Sock::Wait() method.

This is a backport of core#20685 [11/20]
https://github.com/bitcoin/bitcoin/pull/20685/commits/ea1845315a109eb105113cb5fbb6f869e1cf010c

Depends on D11019

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D11022

Details

Provenance
Vasil Dimov <vd@FreeBSD.org>Authored on Feb 12 2021, 13:05
PiRKCommitted on Feb 11 2022, 08:06
PiRKPushed on Feb 11 2022, 08:06
Reviewer
Restricted Project
Differential Revision
D11022: net: extend Sock::Wait() to report a timeout
Parents
rABC60329d3282d6: net: dedup MSG_NOSIGNAL and MSG_DONTWAIT definitions
Branches
Unknown
Tags
Unknown