1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-22 14:05:07 +00:00

LibCore: Move LibGUI/GNotifier to LibCore/CNotifier.

This commit is contained in:
Andreas Kling 2019-04-10 17:35:43 +02:00
parent b2542414d7
commit fc1d3074de
15 changed files with 53 additions and 53 deletions

View file

@ -1,5 +1,5 @@
#include <LibGUI/GSocket.h>
#include <LibGUI/GNotifier.h>
#include <LibCore/CNotifier.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
@ -53,11 +53,11 @@ bool GSocket::connect(const GSocketAddress& address, int port)
if (rc < 0) {
if (errno == EINPROGRESS) {
printf("in progress.\n");
m_notifier = make<GNotifier>(fd(), GNotifier::Event::Write);
m_notifier->on_ready_to_write = [this] (GNotifier&) {
m_notifier = make<CNotifier>(fd(), CNotifier::Event::Write);
m_notifier->on_ready_to_write = [this] {
printf("%s{%p} connected!\n", class_name(), this);
m_connected = true;
m_notifier->set_event_mask(GNotifier::Event::None);
m_notifier->set_event_mask(CNotifier::Event::None);
if (on_connected)
on_connected();
};