Commit 779ba2b9 authored by Greg Williams's avatar Greg Williams
Browse files

Added a new scripts/ folder with a start_kinetic_ruby_server.rb script for...

Added a new scripts/ folder with a start_kinetic_ruby_server.rb script for testing socket IO outside of ceedling
parent fb2c0fb2
Loading
Loading
Loading
Loading
+22 −0
Original line number Diff line number Diff line
require 'kinetic-ruby'


server = KineticRuby::Server.new(KineticRuby::DEFAULT_KINETIC_PORT)
puts "Kinetic Ruby Simulator waiting for a connection..."

trap("SIGINT") do
  puts
  puts "Shutting down..."
  server.shutdown
  exit 0
end

while(!server.connected) do
  sleep(0.25)
end
puts "Kinetic Ruby Simulator connected!"
while(server.connected)
  sleep(1)
end