event/SocketEvent: move Dispatch() down
This commit is contained in:
@@ -28,16 +28,6 @@
|
|||||||
#include <cerrno>
|
#include <cerrno>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void
|
|
||||||
SocketEvent::Dispatch() noexcept
|
|
||||||
{
|
|
||||||
const unsigned flags = std::exchange(ready_flags, 0) &
|
|
||||||
(GetScheduledFlags() | IMPLICIT_FLAGS);
|
|
||||||
|
|
||||||
if (flags != 0)
|
|
||||||
callback(flags);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
SocketEvent::Open(SocketDescriptor _fd) noexcept
|
SocketEvent::Open(SocketDescriptor _fd) noexcept
|
||||||
{
|
{
|
||||||
@@ -99,3 +89,13 @@ SocketEvent::Schedule(unsigned flags) noexcept
|
|||||||
|
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
SocketEvent::Dispatch() noexcept
|
||||||
|
{
|
||||||
|
const unsigned flags = std::exchange(ready_flags, 0) &
|
||||||
|
(GetScheduledFlags() | IMPLICIT_FLAGS);
|
||||||
|
|
||||||
|
if (flags != 0)
|
||||||
|
callback(flags);
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user