Obsolete
/
ipc.cr-old
Archived
3
0
Fork 0

pongc & pongd

dev
Karchnu 2020-07-23 19:10:16 +02:00
parent 8998c9adc8
commit 5d19fed727
2 changed files with 2 additions and 9 deletions

View File

@ -78,15 +78,8 @@ def main
CLI.message.not_nil!
end
message = IPC::Message.new server_fd.not_nil!,
CLI.type.to_u8,
CLI.user_type.to_u8,
mstr
message.fd = server_fd.not_nil!
CLI.rounds.times do |i|
client.send message
client.send server_fd.not_nil!, CLI.user_type.to_u8, mstr.to_slice
end
when IPC::Event::MessageReceived
nb_messages_remaining -= 1

View File

@ -39,7 +39,7 @@ def main
service.timer = CLI.timer # default: 30 seconds
service.loop do |event|
service.pp
# service.pp
case event
when IPC::Event::Timer
info "IPC::Event::Timer"