Sha256: 776464bf43cfb71f09cc7d333da5cdf4bbd62103971dc4c1999e7a85c606fef3

Contents?: true

Size: 762 Bytes

Versions: 30

Compression:

Stored size: 762 Bytes

Contents

# !SLIDE :capture_code_output true
# Synchronous HTTP service on instance methods.

require 'example_helper'
require 'asir/transport/webrick'
require 'asir/coder/base64'
begin
  MyClass.asir.transport = t =
    ASIR::Transport::Webrick.new(:uri => "http://localhost:30914/")
  t.encoder =
    ASIR::Coder::Chain.new(:encoders =>
                           [ ASIR::Coder::Marshal.new,
                             ASIR::Coder::Base64.new, ])
  server_process do
    t.prepare_server!
    t.run_server!
  end
  pr MyClass.new("abc123").asir.size
  sleep 2
rescue Object => err
  $stderr.puts "#{err.inspect}\n#{err.backtrace * "\n"}"
ensure
  t.close; sleep 3; server_kill
end

# !SLIDE END
# EXPECT: : client process
# EXPECT: : server process
# EXPECT: : pr: 6

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
asir-1.2.11 example/ex14.rb
asir-1.2.10 example/ex14.rb
asir-1.2.9 example/ex14.rb
asir-1.2.8 example/ex14.rb
asir-1.2.7 example/ex14.rb
asir-1.2.6 example/ex14.rb
asir-1.2.5 example/ex14.rb
asir-1.2.3 example/ex14.rb
asir-1.2.2 example/ex14.rb
asir-1.2.1 example/ex14.rb
asir-1.2.0 example/ex14.rb
asir-1.1.12 example/ex14.rb
asir-1.1.11 example/ex14.rb
asir-1.1.10 example/ex14.rb
asir-1.1.9 example/ex14.rb
asir-1.1.8 example/ex14.rb
asir-1.1.7 example/ex14.rb
asir-1.1.6 example/ex14.rb
asir-1.1.5 example/ex14.rb
asir-1.1.4 example/ex14.rb