mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 19:15:09 +00:00
IPv4: Mark UDP sockets as connected immediately upon connect()
This makes it possible to write() to a blocking UDPSocket. Previously this was not possible since can_write() depends on is_connected().
This commit is contained in:
parent
388d40d755
commit
2ce9a705e3
1 changed files with 1 additions and 0 deletions
|
@ -111,6 +111,7 @@ int UDPSocket::protocol_send(const void* data, int data_length)
|
|||
KResult UDPSocket::protocol_connect(FileDescription&, ShouldBlock)
|
||||
{
|
||||
m_role = Role::Connected;
|
||||
set_connected(true);
|
||||
return KSuccess;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue