Sha256: 4e33cee715d2c3544392e48fb4a7a994b24f06622ad2f4a90f4c669a82232b9e

Contents?: true

Size: 478 Bytes

Versions: 3

Compression:

Stored size: 478 Bytes

Contents

#!/usr/bin/env ruby
require "rubygems"
$:.unshift File.expand_path '../lib', File.dirname(__FILE__)
require 'em-rocketio-linda-client'

EM::run do
  client = EM::RocketIO::Linda::Client.new "http://linda.shokai.org"
  ts = client.tuplespace["test_spae"]

  client.io.on :connect do
    puts "connect #{client.io.type} (#{client.io.session})"

    ts.watch [1,2] do |tuple|
      p tuple
    end

    EM::add_periodic_timer 1 do
      ts.write [1,2, Time.now]
    end
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
em-rocketio-linda-client-0.0.3 sample/sample.rb
em-rocketio-linda-client-0.0.2 sample/sample.rb
em-rocketio-linda-client-0.0.1 sample/sample.rb