mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-29 23:09:44 -04:00
net: remove now unused Sock::Release()
This commit is contained in:
parent
8e7eeb5971
commit
175fb2670a
3 changed files with 0 additions and 24 deletions
|
@ -69,16 +69,6 @@ BOOST_AUTO_TEST_CASE(move_assignment)
|
|||
BOOST_CHECK(SocketIsClosed(s));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(release)
|
||||
{
|
||||
SOCKET s = CreateSocket();
|
||||
Sock* sock = new Sock(s);
|
||||
BOOST_CHECK_EQUAL(sock->Release(), s);
|
||||
delete sock;
|
||||
BOOST_CHECK(!SocketIsClosed(s));
|
||||
BOOST_REQUIRE(CloseSocket(s));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(reset)
|
||||
{
|
||||
const SOCKET s = CreateSocket();
|
||||
|
|
|
@ -51,13 +51,6 @@ Sock& Sock::operator=(Sock&& other)
|
|||
|
||||
SOCKET Sock::Get() const { return m_socket; }
|
||||
|
||||
SOCKET Sock::Release()
|
||||
{
|
||||
const SOCKET s = m_socket;
|
||||
m_socket = INVALID_SOCKET;
|
||||
return s;
|
||||
}
|
||||
|
||||
void Sock::Reset() { CloseSocket(m_socket); }
|
||||
|
||||
ssize_t Sock::Send(const void* data, size_t len, int flags) const
|
||||
|
|
|
@ -68,13 +68,6 @@ public:
|
|||
*/
|
||||
[[nodiscard]] virtual SOCKET Get() const;
|
||||
|
||||
/**
|
||||
* Get the value of the contained socket and drop ownership. It will not be closed by the
|
||||
* destructor after this call.
|
||||
* @return socket or INVALID_SOCKET if empty
|
||||
*/
|
||||
virtual SOCKET Release();
|
||||
|
||||
/**
|
||||
* Close if non-empty.
|
||||
*/
|
||||
|
|
Loading…
Add table
Reference in a new issue