Skip to content

Commit

Permalink
IPv4: Mark UDP sockets as connected immediately upon connect()
Browse files Browse the repository at this point in the history
This makes it possible to write() to a blocking UDPSocket. Previously
this was not possible since can_write() depends on is_connected().
  • Loading branch information
awesomekling committed Jan 26, 2020
1 parent 388d40d commit 2ce9a70
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Kernel/Net/UDPSocket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 2ce9a70

Please sign in to comment.