From 48c76930a4820cc7f44aa4ffa14a5646cdf498e4 Mon Sep 17 00:00:00 2001 From: Luka Vandervelden Date: Thu, 11 Oct 2018 18:31:48 +0900 Subject: [PATCH] Crystal bindings update. --- core/ipc.cr | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/ipc.cr b/core/ipc.cr index 4bedaf1..acd3410 100644 --- a/core/ipc.cr +++ b/core/ipc.cr @@ -74,6 +74,12 @@ class IPC::Service at_exit { close } end + def initialize(name : String, &block : Proc(IPC::Event::Connection | IPC::Event::Disconnection | IPC::Event::Message, Nil)) + initialize name + loop &block + close + end + def close return if @closed