mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:27:35 +00:00
LibCore: Simplify Core::Notifier by only allowing one event type
Not a single client of this API actually used the event mask feature to listen for readability AND writability. Let's simplify the API and have only one hook: on_activation.
This commit is contained in:
parent
1587caef84
commit
411d36719e
24 changed files with 80 additions and 99 deletions
|
@ -49,8 +49,8 @@ ErrorOr<void> LocalServer::take_over_from_system_server(DeprecatedString const&
|
|||
|
||||
void LocalServer::setup_notifier()
|
||||
{
|
||||
m_notifier = Notifier::construct(m_fd, Notifier::Event::Read, this);
|
||||
m_notifier->on_ready_to_read = [this] {
|
||||
m_notifier = Notifier::construct(m_fd, Notifier::Type::Read, this);
|
||||
m_notifier->on_activation = [this] {
|
||||
if (on_accept) {
|
||||
auto maybe_client_socket = accept();
|
||||
if (maybe_client_socket.is_error()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue