HomePhabricator

net: move CloseSocket() from netbase to util/sock

Description

net: move CloseSocket() from netbase to util/sock

Summary:
Move CloseSocket() (and NetworkErrorString() which it uses) from
netbase.{h,cpp} to newly added src/util/sock.{h,cpp}.

This is necessary in order to use CloseSocket() from a newly
introduced Sock class (which will live in src/util/sock.{h,cpp}).
sock.{h,cpp} cannot depend on netbase because netbase will depend
on it.

This is a backport of core#20788 [2/5]
https://github.com/bitcoin/bitcoin/pull/20788/commits/dec9b5e850c6aad989e814aea5b630b36f55d580
Depends on D11003

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

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

Details

Provenance
PiRKAuthored on Feb 4 2022, 16:56
PiRKPushed on Feb 8 2022, 13:41
Reviewer
Restricted Project
Differential Revision
D11004: net: move CloseSocket() from netbase to util/sock
Parents
rABC824cdcfc4281: net: move MillisToTimeval() from netbase to util/time
Branches
Unknown
Tags
Unknown