This commit is contained in:
Loic Nageleisen 2015-12-15 13:50:47 +01:00
parent 0cdf0a490a
commit 06273c3525
11 changed files with 208 additions and 29 deletions

View file

@ -3,10 +3,13 @@
require 'channel'
def ping(pings, msg)
pings = pings.send_only!
pings << msg
end
def pong(pings, pongs)
pings = pings.receive_only!
pongs = pongs.send_only!
msg = pings.recv
pongs << msg
end