netbase: refactor CreateSock() to accept sa_family_t

Also implement CService::GetSAFamily() to provide sa_family_t
This commit is contained in:
Matthew Zipkin
2023-05-26 12:26:43 -04:00
parent adb3a3e51d
commit bae86c8d31
9 changed files with 46 additions and 25 deletions

View File

@@ -326,7 +326,7 @@ Session::Reply Session::SendRequestAndGetReply(const Sock& sock,
std::unique_ptr<Sock> Session::Hello() const
{
auto sock = CreateSock(m_control_host);
auto sock = CreateSock(m_control_host.GetSAFamily());
if (!sock) {
throw std::runtime_error("Cannot create socket");