1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 12:28:12 +00:00

IPv4: More work on the TCP implementation.

I can now establish a connection to my little test server on the host.
This commit is contained in:
Andreas Kling 2019-03-14 00:20:44 +01:00
parent 032d9d7065
commit 66d55f8e0c
9 changed files with 36 additions and 18 deletions

View file

@ -2329,6 +2329,7 @@ void Process::finalize()
}
}
}
m_blocked_socket = nullptr;
set_state(Dead);
}
@ -2511,10 +2512,10 @@ KResult Process::wait_for_connect(Socket& socket)
{
if (socket.is_connected())
return KSuccess;
m_blocked_connecting_socket = socket;
m_blocked_socket = socket;
block(BlockedConnect);
Scheduler::yield();
m_blocked_connecting_socket = nullptr;
m_blocked_socket = nullptr;
if (!socket.is_connected())
return KResult(-ECONNREFUSED);
return KSuccess;