summaryrefslogtreecommitdiff
path: root/Userland/Services/LookupServer
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Services/LookupServer')
-rw-r--r--Userland/Services/LookupServer/CMakeLists.txt2
-rw-r--r--Userland/Services/LookupServer/ConnectionFromClient.cpp (renamed from Userland/Services/LookupServer/ClientConnection.cpp)16
-rw-r--r--Userland/Services/LookupServer/ConnectionFromClient.h (renamed from Userland/Services/LookupServer/ClientConnection.h)12
-rw-r--r--Userland/Services/LookupServer/LookupServer.cpp4
-rw-r--r--Userland/Services/LookupServer/LookupServer.h4
5 files changed, 19 insertions, 19 deletions
diff --git a/Userland/Services/LookupServer/CMakeLists.txt b/Userland/Services/LookupServer/CMakeLists.txt
index 8e2a4f42bd..05187fb073 100644
--- a/Userland/Services/LookupServer/CMakeLists.txt
+++ b/Userland/Services/LookupServer/CMakeLists.txt
@@ -15,7 +15,7 @@ set(SOURCES
LookupServer.cpp
LookupServerEndpoint.h
LookupClientEndpoint.h
- ClientConnection.cpp
+ ConnectionFromClient.cpp
MulticastDNS.cpp
main.cpp
)
diff --git a/Userland/Services/LookupServer/ClientConnection.cpp b/Userland/Services/LookupServer/ConnectionFromClient.cpp
index 273ca96873..4617f8b1f7 100644
--- a/Userland/Services/LookupServer/ClientConnection.cpp
+++ b/Userland/Services/LookupServer/ConnectionFromClient.cpp
@@ -4,31 +4,31 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
-#include "ClientConnection.h"
+#include "ConnectionFromClient.h"
#include "DNSPacket.h"
#include "LookupServer.h"
#include <AK/IPv4Address.h>
namespace LookupServer {
-static HashMap<int, RefPtr<ClientConnection>> s_connections;
+static HashMap<int, RefPtr<ConnectionFromClient>> s_connections;
-ClientConnection::ClientConnection(NonnullOwnPtr<Core::Stream::LocalSocket> socket, int client_id)
- : IPC::ClientConnection<LookupClientEndpoint, LookupServerEndpoint>(*this, move(socket), client_id)
+ConnectionFromClient::ConnectionFromClient(NonnullOwnPtr<Core::Stream::LocalSocket> socket, int client_id)
+ : IPC::ConnectionFromClient<LookupClientEndpoint, LookupServerEndpoint>(*this, move(socket), client_id)
{
s_connections.set(client_id, *this);
}
-ClientConnection::~ClientConnection()
+ConnectionFromClient::~ConnectionFromClient()
{
}
-void ClientConnection::die()
+void ConnectionFromClient::die()
{
s_connections.remove(client_id());
}
-Messages::LookupServer::LookupNameResponse ClientConnection::lookup_name(String const& name)
+Messages::LookupServer::LookupNameResponse ConnectionFromClient::lookup_name(String const& name)
{
auto maybe_answers = LookupServer::the().lookup(name, DNSRecordType::A);
if (maybe_answers.is_error()) {
@@ -43,7 +43,7 @@ Messages::LookupServer::LookupNameResponse ClientConnection::lookup_name(String
return { 0, move(addresses) };
}
-Messages::LookupServer::LookupAddressResponse ClientConnection::lookup_address(String const& address)
+Messages::LookupServer::LookupAddressResponse ConnectionFromClient::lookup_address(String const& address)
{
if (address.length() != 4)
return { 1, String() };
diff --git a/Userland/Services/LookupServer/ClientConnection.h b/Userland/Services/LookupServer/ConnectionFromClient.h
index a9299e2889..72ded551b2 100644
--- a/Userland/Services/LookupServer/ClientConnection.h
+++ b/Userland/Services/LookupServer/ConnectionFromClient.h
@@ -7,23 +7,23 @@
#pragma once
#include <AK/HashMap.h>
-#include <LibIPC/ClientConnection.h>
+#include <LibIPC/ConnectionFromClient.h>
#include <LookupServer/LookupClientEndpoint.h>
#include <LookupServer/LookupServerEndpoint.h>
namespace LookupServer {
-class ClientConnection final
- : public IPC::ClientConnection<LookupClientEndpoint, LookupServerEndpoint> {
- C_OBJECT(ClientConnection);
+class ConnectionFromClient final
+ : public IPC::ConnectionFromClient<LookupClientEndpoint, LookupServerEndpoint> {
+ C_OBJECT(ConnectionFromClient);
public:
- virtual ~ClientConnection() override;
+ virtual ~ConnectionFromClient() override;
virtual void die() override;
private:
- explicit ClientConnection(NonnullOwnPtr<Core::Stream::LocalSocket>, int client_id);
+ explicit ConnectionFromClient(NonnullOwnPtr<Core::Stream::LocalSocket>, int client_id);
virtual Messages::LookupServer::LookupNameResponse lookup_name(String const&) override;
virtual Messages::LookupServer::LookupAddressResponse lookup_address(String const&) override;
diff --git a/Userland/Services/LookupServer/LookupServer.cpp b/Userland/Services/LookupServer/LookupServer.cpp
index 0edaeb6d54..5d9335c938 100644
--- a/Userland/Services/LookupServer/LookupServer.cpp
+++ b/Userland/Services/LookupServer/LookupServer.cpp
@@ -5,7 +5,7 @@
*/
#include "LookupServer.h"
-#include "ClientConnection.h"
+#include "ConnectionFromClient.h"
#include "DNSPacket.h"
#include <AK/Debug.h>
#include <AK/HashMap.h>
@@ -72,7 +72,7 @@ LookupServer::LookupServer()
}
m_mdns = MulticastDNS::construct(this);
- m_server = MUST(IPC::MultiServer<ClientConnection>::try_create());
+ m_server = MUST(IPC::MultiServer<ConnectionFromClient>::try_create());
}
void LookupServer::load_etc_hosts()
diff --git a/Userland/Services/LookupServer/LookupServer.h b/Userland/Services/LookupServer/LookupServer.h
index 829d0e5c95..88c7fcc740 100644
--- a/Userland/Services/LookupServer/LookupServer.h
+++ b/Userland/Services/LookupServer/LookupServer.h
@@ -6,7 +6,7 @@
#pragma once
-#include "ClientConnection.h"
+#include "ConnectionFromClient.h"
#include "DNSName.h"
#include "DNSPacket.h"
#include "DNSServer.h"
@@ -34,7 +34,7 @@ private:
ErrorOr<Vector<DNSAnswer>> lookup(const DNSName& hostname, const String& nameserver, bool& did_get_response, DNSRecordType record_type, ShouldRandomizeCase = ShouldRandomizeCase::Yes);
- OwnPtr<IPC::MultiServer<ClientConnection>> m_server;
+ OwnPtr<IPC::MultiServer<ConnectionFromClient>> m_server;
RefPtr<DNSServer> m_dns_server;
RefPtr<MulticastDNS> m_mdns;
Vector<String> m_nameservers;