Page MenuHomePhabricator

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

Authored by PiRK on Feb 7 2022, 17:27.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABCdbfdac4aa4c3: 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