Kernel: Convert IPv4SocketTuple::to_string() to KString

This commit is contained in:
Idan Horowitz 2022-01-11 22:29:22 +02:00
parent b84444cbb3
commit c92753a686
Notes: sideshowbarker 2024-07-17 21:03:06 +09:00

View file

@ -9,6 +9,7 @@
#include <AK/HashMap.h>
#include <Kernel/DoubleBuffer.h>
#include <Kernel/KBuffer.h>
#include <Kernel/KString.h>
#include <Kernel/Locking/Mutex.h>
#include <Kernel/Net/IPv4.h>
#include <Kernel/Net/Socket.h>
@ -33,9 +34,9 @@ public:
return other.local_address() == m_local_address && other.local_port() == m_local_port && other.peer_address() == m_peer_address && other.peer_port() == m_peer_port;
};
String to_string() const
ErrorOr<NonnullOwnPtr<KString>> to_string() const
{
return String::formatted(
return KString::formatted(
"{}:{} -> {}:{}",
m_local_address,
m_local_port,