diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-11-04 12:49:48 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-11-04 12:49:48 +0100 |
commit | 50d937152ae0b2f35ac342fdcf5527169adb981d (patch) | |
tree | 259fe33a5ca6ebcd7c5fd6985fc95cb279347daf /Libraries/LibCore | |
parent | fbe8569412362fddc60e517e8a30aa3a7383a580 (diff) | |
download | serenity-50d937152ae0b2f35ac342fdcf5527169adb981d.zip |
LibCore: Constify CTCPServer's local_address() and local_port()
Diffstat (limited to 'Libraries/LibCore')
-rw-r--r-- | Libraries/LibCore/CTCPServer.cpp | 4 | ||||
-rw-r--r-- | Libraries/LibCore/CTCPServer.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/Libraries/LibCore/CTCPServer.cpp b/Libraries/LibCore/CTCPServer.cpp index 632812f496..190eacf6bd 100644 --- a/Libraries/LibCore/CTCPServer.cpp +++ b/Libraries/LibCore/CTCPServer.cpp @@ -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; diff --git a/Libraries/LibCore/CTCPServer.h b/Libraries/LibCore/CTCPServer.h index 4f17f61801..dcf6c54363 100644 --- a/Libraries/LibCore/CTCPServer.h +++ b/Libraries/LibCore/CTCPServer.h @@ -16,8 +16,8 @@ public: RefPtr<CTCPSocket> accept(); - IPv4Address local_address(); - u16 local_port(); + IPv4Address local_address() const; + u16 local_port() const; Function<void()> on_ready_to_accept; |