From 70a102dbd71c1859d73461b8a966a0f02d708768 Mon Sep 17 00:00:00 2001 From: Karchnu Date: Fri, 3 Jul 2020 22:44:34 +0200 Subject: [PATCH] things --- src/ipc.cr | 2 +- src/ipc/context.cr | 6 +++--- src/ipc/{service.cr => server.cr} | 20 ++++++++++---------- 3 files changed, 14 insertions(+), 14 deletions(-) rename src/ipc/{service.cr => server.cr} (62%) diff --git a/src/ipc.cr b/src/ipc.cr index 02cc134..3da3c5a 100644 --- a/src/ipc.cr +++ b/src/ipc.cr @@ -5,4 +5,4 @@ require "./ipc/event.cr" require "./ipc/switch.cr" require "./ipc/context.cr" require "./ipc/client.cr" -require "./ipc/service.cr" +require "./ipc/server.cr" diff --git a/src/ipc/context.cr b/src/ipc/context.cr index 5989a77..fe94841 100644 --- a/src/ipc/context.cr +++ b/src/ipc/context.cr @@ -153,7 +153,7 @@ class IPC::Context @closed = true end - # def pp - # LibIPC.ipc_connections_print @context - # end + def pp + LibIPC.ipc_ctx_print @context + end end diff --git a/src/ipc/service.cr b/src/ipc/server.cr similarity index 62% rename from src/ipc/service.cr rename to src/ipc/server.cr index ecbbe6d..fafd5cb 100644 --- a/src/ipc/service.cr +++ b/src/ipc/server.cr @@ -15,14 +15,14 @@ class IPC::Server < IPC::Context end end -# # TODO: replacing IPC::Service by the IPC::NetworkD class? -# class IPC::SwitchingService < IPC::Server -# property switch = IPC::Switch.new -# -# # automatic removal of the fd in the switching list -# def remove_fd (fd : Int) -# super -# @switch.del fd -# end -# end +# TODO: replacing IPC::Service by the IPC::NetworkD class? +class IPC::SwitchingService < IPC::Server + property switch = IPC::Switch.new + + # automatic removal of the fd in the switching list + def remove_fd (fd : Int) + super + @switch.del fd + end +end