lib/asir/transport/file.rb in asir-0.2.0 vs lib/asir/transport/file.rb in asir-1.0.1

- old
+ new

@@ -53,33 +53,35 @@ # Process (receive) messages from a file. def serve_file! ::File.open(file, "r") do | stream | @running = true - serve_stream! stream, nil # One-way: no result stream. + _serve_stream! stream, nil # One-way: no result stream. end end # !SLIDE # Named Pipe Server - def prepare_pipe_server! + def prepare_server! # _log [ :prepare_pipe_server!, file ] unless ::File.exist? file system(cmd = "mkfifo #{file.inspect}") or raise "cannot run #{cmd.inspect}" ::File.chmod(perms, file) rescue nil if perms end end + alias :prepare_pipe_server! :prepare_server! - def run_pipe_server! + def run_server! # _log [ :run_pipe_server!, file ] with_server_signals! do @running = true while @running serve_file! end end end + alias :run_pipe_server! :run_server! # !SLIDE END end # !SLIDE END end