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
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D11006