Sha256: bf4befca3f28e4ef01a4c49241f37e66f755e2f3cfb0e45114a072dd565ec4fc

Contents?: true

Size: 524 Bytes

Versions: 6

Compression:

Stored size: 524 Bytes

Contents

# compatible with ruby 1.8, 1.9, and jruby
$:.unshift File.join( File.dirname( __FILE__ ), '..', 'lib')
require 'osc-ruby'

require 'rubygems'
require 'eventmachine'
require 'osc-ruby/em_server'

@server = OSC::EMServer.new( 3333 )
@client = OSC::Client.new( 'localhost', 3333 )

@server.add_method '/greeting' do | message |
  puts "#{message.ip_address}:#{message.ip_port} -- #{message.address} -- #{message.to_a}"
end

Thread.new do
  @server.run
end

@client.send( OSC::Message.new( "/greeting" , "hullo!" ))

sleep( 3 )

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
osc-ruby-1.1.5 examples/event_machine_server.rb
osc-ruby-1.1.4 examples/event_machine_server.rb
osc-ruby-1.1.3 examples/event_machine_server.rb
osc-ruby-1.1.2 examples/event_machine_server.rb
osc-ruby-1.1.1 examples/event_machine_server.rb
osc-ruby-1.1.0 examples/event_machine_server.rb