event/SocketEvent: rename Steal() to ReleaseSocket()
This commit is contained in:
@@ -37,16 +37,6 @@ SocketEvent::Open(SocketDescriptor _fd) noexcept
|
||||
fd = _fd;
|
||||
}
|
||||
|
||||
SocketDescriptor
|
||||
SocketEvent::Steal() noexcept
|
||||
{
|
||||
assert(IsDefined());
|
||||
|
||||
Cancel();
|
||||
|
||||
return std::exchange(fd, SocketDescriptor::Undefined());
|
||||
}
|
||||
|
||||
void
|
||||
SocketEvent::Close() noexcept
|
||||
{
|
||||
|
||||
@@ -109,13 +109,12 @@ public:
|
||||
return fd;
|
||||
}
|
||||
|
||||
void Open(SocketDescriptor _fd) noexcept;
|
||||
SocketDescriptor ReleaseSocket() noexcept {
|
||||
Cancel();
|
||||
return std::exchange(fd, SocketDescriptor::Undefined());
|
||||
}
|
||||
|
||||
/**
|
||||
* "Steal" the socket descriptor. This abandons the socket
|
||||
* and returns it.
|
||||
*/
|
||||
SocketDescriptor Steal() noexcept;
|
||||
void Open(SocketDescriptor _fd) noexcept;
|
||||
|
||||
void Close() noexcept;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user