lib/pipe_rpc/gateway.rb in pipe_rpc-2.2.1 vs lib/pipe_rpc/gateway.rb in pipe_rpc-2.2.2
- old
+ new
@@ -22,15 +22,23 @@
def on_sent(&on_sent)
@hub.socket.on_sent(&on_sent)
end
+ def off_sent(on_sent)
+ @hub.socket.off_sent(on_sent)
+ end
+
def on_received(&on_received)
@hub.socket.on_received(&on_received)
end
- def close
- @hub.socket.close
+ def off_received(on_received)
+ @hub.socket.off_received(on_received)
+ end
+
+ def close(reason = 'manually closed')
+ @hub.socket.close(reason)
end
def handle_message
@hub.handle_message
end
\ No newline at end of file