mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:17:44 +00:00
Kernel: Add so_error to keep track of the socket's error state
This sets the m_so_error variable every time the socket returns an error.
This commit is contained in:
parent
f424485193
commit
0095c7cb7d
6 changed files with 88 additions and 78 deletions
|
@ -130,6 +130,13 @@ protected:
|
|||
|
||||
Role m_role { Role::None };
|
||||
|
||||
KResult so_error() const { return m_so_error; }
|
||||
KResult set_so_error(KResult error)
|
||||
{
|
||||
m_so_error = error;
|
||||
return error;
|
||||
}
|
||||
|
||||
protected:
|
||||
ucred m_origin { 0, 0, 0 };
|
||||
ucred m_acceptor { 0, 0, 0 };
|
||||
|
@ -154,6 +161,8 @@ private:
|
|||
Time m_send_timeout {};
|
||||
int m_timestamp { 0 };
|
||||
|
||||
KResult m_so_error { KSuccess };
|
||||
|
||||
NonnullRefPtrVector<Socket> m_pending;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue