mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:38:10 +00:00
Kernel: Use a more detailed state machine for socket setup
This commit is contained in:
parent
638008da13
commit
bd6d2c0819
8 changed files with 64 additions and 11 deletions
|
@ -74,7 +74,7 @@ bool IPv4Socket::get_peer_address(sockaddr* address, socklen_t* address_size)
|
|||
|
||||
KResult IPv4Socket::bind(const sockaddr* address, socklen_t address_size)
|
||||
{
|
||||
ASSERT(!is_connected());
|
||||
ASSERT(setup_state() == SetupState::Unstarted);
|
||||
if (address_size != sizeof(sockaddr_in))
|
||||
return KResult(-EINVAL);
|
||||
if (address->sa_family != AF_INET)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue