Sha256: e48ee279628a14f43e507da7b709b27e47dd146f066bd48455ec37e8e55fdf26
Contents?: true
Size: 757 Bytes
Versions: 9
Compression:
Stored size: 757 Bytes
Contents
# !SLIDE :capture_code_output true # Bi-directional ZMQ service. require 'example_helper' require 'asir/transport/zmq' begin zmq = ASIR::Transport::Zmq.new(:port => 31920, :encoder => ASIR::Coder::Marshal.new, :one_way => false) server_process do zmq.prepare_server! zmq.run_server! end UnsafeService.asir.transport = t = zmq pr UnsafeService.asir.do_it(":ok") rescue ::Exception => err $stderr.puts "### #{$$}: ERROR: #{err.inspect}\n #{err.backtrace * "\n "}" raise ensure zmq.close rescue nil; sleep 1; server_kill end # !SLIDE END # EXPECT: : client process # EXPECT: : server process # EXPECT: UnsafeService.do_it => :ok # EXPECT: : pr: :ok # EXPECT!: ERROR
Version data entries
9 entries across 9 versions & 2 rubygems