Sha256: 14408e8309c2c18a1ab14c460856fb15eaba9aeabe302d6144c1ff6c725c8f40

Contents?: true

Size: 460 Bytes

Versions: 1

Compression:

Stored size: 460 Bytes

Contents

#!/usr/bin/env ruby

require "rubygems"
require "#{File.dirname(__FILE__)}/../lib/pigato.rb"
#require "pigato"
require 'thread'

client = Pigato::Client.new('tcp://localhost:55555', { :autostart => true })
c1 = Thread.new {
  requests = 1000
  d1 = Time.now
  requests.times do |i|
    begin
      client.request('echo', 'Hello world')
    end
  end
  d2 = Time.now
  puts "#{requests} requests/replies processed (#{(d2 - d1) * 1000} milliseconds)"
}

c1.join

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pigato-0.2.12 examples/echo_client.rb