mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 06:38:10 +00:00
Kernel: Move TCP state logging into TCPSocket
This commit is contained in:
parent
e978e7543f
commit
638008da13
3 changed files with 12 additions and 19 deletions
|
@ -15,6 +15,17 @@ void TCPSocket::for_each(Function<void(TCPSocket&)> callback)
|
|||
callback(*it.value);
|
||||
}
|
||||
|
||||
void TCPSocket::set_state(State new_state)
|
||||
{
|
||||
#ifdef TCP_SOCKET_DEBUG
|
||||
kprintf("%s(%u) TCPSocket{%p} state moving from %s to %s\n",
|
||||
current->process().name().characters(), current->pid(), this,
|
||||
to_string(m_state), to_string(new_state));
|
||||
#endif
|
||||
|
||||
m_state = new_state;
|
||||
}
|
||||
|
||||
Lockable<HashMap<IPv4SocketTuple, TCPSocket*>>& TCPSocket::sockets_by_tuple()
|
||||
{
|
||||
static Lockable<HashMap<IPv4SocketTuple, TCPSocket*>>* s_map;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue