LibIPC: Delete unused code in Connection

This commit is contained in:
Aliaksandr Kalenik 2025-10-01 19:58:44 +02:00 committed by Tim Flynn
parent a5697b4796
commit 93d7efa4c3
2 changed files with 0 additions and 16 deletions

View File

@ -8,7 +8,6 @@
#include <AK/Vector.h>
#include <LibCore/Socket.h>
#include <LibCore/Timer.h>
#include <LibIPC/Connection.h>
#include <LibIPC/Message.h>
#include <LibIPC/Stub.h>
@ -20,8 +19,6 @@ ConnectionBase::ConnectionBase(IPC::Stub& local_stub, NonnullOwnPtr<Transport> t
, m_transport(move(transport))
, m_local_endpoint_magic(local_endpoint_magic)
{
m_responsiveness_timer = Core::Timer::create_single_shot(3000, [this] { may_have_become_unresponsive(); });
m_transport->set_up_read_hook([this] {
NonnullRefPtr protect = *this;
// FIXME: Do something about errors.
@ -51,7 +48,6 @@ ErrorOr<void> ConnectionBase::post_message(MessageBuffer buffer)
MUST(buffer.transfer_message(*m_transport));
m_responsiveness_timer->start();
return {};
}
@ -107,8 +103,6 @@ ErrorOr<void> ConnectionBase::drain_messages_from_peer()
});
if (!m_unprocessed_messages.is_empty()) {
m_responsiveness_timer->stop();
did_become_responsive();
deferred_invoke([this] {
handle_messages();
});

View File

@ -36,8 +36,6 @@ public:
protected:
explicit ConnectionBase(IPC::Stub&, NonnullOwnPtr<Transport>, u32 local_endpoint_magic);
virtual void may_have_become_unresponsive() { }
virtual void did_become_responsive() { }
virtual void shutdown_with_error(Error const&);
virtual OwnPtr<Message> try_parse_message(ReadonlyBytes, Queue<File>&) = 0;
@ -51,8 +49,6 @@ protected:
NonnullOwnPtr<Transport> m_transport;
RefPtr<Core::Timer> m_responsiveness_timer;
Vector<NonnullOwnPtr<Message>> m_unprocessed_messages;
u32 m_local_endpoint_magic { 0 };
@ -66,12 +62,6 @@ public:
{
}
template<typename MessageType>
OwnPtr<MessageType> wait_for_specific_message()
{
return wait_for_specific_endpoint_message<MessageType, LocalEndpoint>();
}
template<typename RequestType, typename... Args>
NonnullOwnPtr<typename RequestType::ResponseType> send_sync(Args&&... args)
{