net: rename Sock::Reset() to Sock::Close() and make it private

Outside of `Sock`, `Sock::Reset()` was used in just one place (in
`i2p.cpp`) which can use the assignment operator instead.

This simplifies the public `Sock` API by having one method less.
This commit is contained in:
Vasil Dimov
2022-06-21 15:23:37 +02:00
parent e8ff3f0c52
commit a724c39606
7 changed files with 28 additions and 46 deletions

View File

@@ -410,7 +410,7 @@ void Session::Disconnect()
Log("Destroying session %s", m_session_id);
}
}
m_control_sock->Reset();
m_control_sock = std::make_unique<Sock>(INVALID_SOCKET);
m_session_id.clear();
}
} // namespace sam