Kernel: Support non-blocking connect().

If connect() is called on a non-blocking socket, it will "fail" immediately
with -EINPROGRESS. After that, you select() on the socket and wait for it to
become writable.
This commit is contained in:
Andreas Kling 2019-04-08 04:52:21 +02:00
commit 65d6318c33
Notes: sideshowbarker 2024-07-19 14:47:37 +09:00
11 changed files with 22 additions and 17 deletions

View file

@ -65,7 +65,7 @@ KResult LocalSocket::bind(const sockaddr* address, socklen_t address_size)
return KSuccess;
}
KResult LocalSocket::connect(const sockaddr* address, socklen_t address_size)
KResult LocalSocket::connect(const sockaddr* address, socklen_t address_size, ShouldBlock)
{
ASSERT(!m_bound);
if (address_size != sizeof(sockaddr_un))