event/MultiSocketMonitor: un-inline AddSocket()
This commit is contained in:
parent
dcbb9fe07c
commit
7764719513
@ -42,6 +42,18 @@ MultiSocketMonitor::Reset() noexcept
|
||||
ready = refresh = false;
|
||||
}
|
||||
|
||||
bool
|
||||
MultiSocketMonitor::AddSocket(SocketDescriptor fd, unsigned events) noexcept
|
||||
{
|
||||
fds.emplace_front(*this, fd);
|
||||
bool success = fds.front().Schedule(events);
|
||||
if (!success) {
|
||||
fds.pop_front();
|
||||
}
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
void
|
||||
MultiSocketMonitor::ClearSocketList() noexcept
|
||||
{
|
||||
|
@ -145,15 +145,7 @@ public:
|
||||
*
|
||||
* May only be called from PrepareSockets().
|
||||
*/
|
||||
bool AddSocket(SocketDescriptor fd, unsigned events) noexcept {
|
||||
fds.emplace_front(*this, fd);
|
||||
bool success = fds.front().Schedule(events);
|
||||
if (!success) {
|
||||
fds.pop_front();
|
||||
}
|
||||
|
||||
return success;
|
||||
}
|
||||
bool AddSocket(SocketDescriptor fd, unsigned events) noexcept;
|
||||
|
||||
/**
|
||||
* Remove all sockets.
|
||||
|
Loading…
Reference in New Issue
Block a user