1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 09:38:11 +00:00

LibCore: Constify CTCPServer's local_address() and local_port()

This commit is contained in:
Andreas Kling 2019-11-04 12:49:48 +01:00
parent fbe8569412
commit 50d937152a
2 changed files with 4 additions and 4 deletions

View file

@ -54,7 +54,7 @@ RefPtr<CTCPSocket> CTCPServer::accept()
return CTCPSocket::construct(accepted_fd);
}
IPv4Address CTCPServer::local_address()
IPv4Address CTCPServer::local_address() const
{
if (m_fd == -1)
return {};
@ -67,7 +67,7 @@ IPv4Address CTCPServer::local_address()
return IPv4Address(address.sin_addr.s_addr);
}
u16 CTCPServer::local_port()
u16 CTCPServer::local_port() const
{
if (m_fd == -1)
return 0;