mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:48:11 +00:00
LibCore: Convert CTCPServer to ObjectPtr
Also get rid of the custom CNotifier::create() in favor of construct().
This commit is contained in:
parent
bce58bbbca
commit
4ea229accd
12 changed files with 23 additions and 27 deletions
|
@ -85,7 +85,7 @@ bool CSocket::common_connect(const struct sockaddr* addr, socklen_t addrlen)
|
|||
if (rc < 0) {
|
||||
if (errno == EINPROGRESS) {
|
||||
dbg() << *this << " connection in progress (EINPROGRESS)";
|
||||
m_notifier = CNotifier::create(fd(), CNotifier::Event::Write, this);
|
||||
m_notifier = CNotifier::construct(fd(), CNotifier::Event::Write, this);
|
||||
m_notifier->on_ready_to_write = [this] {
|
||||
dbg() << *this << " connected!";
|
||||
m_connected = true;
|
||||
|
@ -132,7 +132,7 @@ void CSocket::did_update_fd(int fd)
|
|||
m_read_notifier = nullptr;
|
||||
return;
|
||||
}
|
||||
m_read_notifier = CNotifier::create(fd, CNotifier::Event::Read, this);
|
||||
m_read_notifier = CNotifier::construct(fd, CNotifier::Event::Read, this);
|
||||
m_read_notifier->on_ready_to_read = [this] {
|
||||
if (on_ready_to_read)
|
||||
on_ready_to_read();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue