Sha256: e2814fd1ebb145215cb1ec6189c1a460b2c683ea4199d335514b710402ba2cb2

Contents?: true

Size: 522 Bytes

Versions: 1

Compression:

Stored size: 522 Bytes

Contents

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

url = ARGV.empty? ? "http://linda.shokai.org" : ARGV.shift

EM::run do
  client = EM::RocketIO::Linda::Client.new url
  ts = client.tuplespace["test_spae"]

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

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

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

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
em-rocketio-linda-client-1.0.0 sample/sample.rb