Obsolete
/
ipc.cr-old
Archived
3
0
Fork 0
poll
Karchnu 2020-07-03 22:41:07 +02:00
parent 6b47af9e9f
commit 77026a249a
3 changed files with 13 additions and 6 deletions

View File

@ -1 +1,8 @@
require "./ipc/*"
require "./ipc/lowlevel.cr"
require "./ipc/exception.cr"
require "./ipc/message.cr"
require "./ipc/event.cr"
require "./ipc/switch.cr"
require "./ipc/context.cr"
require "./ipc/client.cr"
require "./ipc/service.cr"

View File

@ -83,11 +83,11 @@ class IPC::Context
end
def loop(&block : Proc(IPC::Event::Events|Exception, Nil))
if @base_timer > 0 && @timer == 0
@timer = @base_timer
end
::loop do
if @base_timer > 0 && @timer == 0
@timer = @base_timer
end
yield wait_event &block
end
end

View File

@ -25,7 +25,7 @@ class IPC::JSON
end
end
class IPC::Connection
class IPC::Context
def send(message : IPC::JSON)
send message.type.to_u8, message.to_json
end