Page MenuHomePhabricator

net: use Sock in InterruptibleRecv() and Socks5()
ClosedPublic

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

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABCe445307f56fa: net: use Sock in InterruptibleRecv() and Socks5()
Summary

Use the Sock class instead of SOCKET for InterruptibleRecv() and
Socks5().

This way the Socks5() function can be tested by giving it a mocked
instance of a socket.

Co-authored-by: practicalswift <practicalswift@users.noreply.github.com>

Note: Apply the same changes to seeder/bitcoin.cpp

This is a backport of core#20788 [4/5]
https://github.com/bitcoin/bitcoin/pull/20788/commits/04ae8469049e1f14585aabfb618ae522150240a7

Depends on D11005

Test Plan

ninja all check-all

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable