From: "Piotr S." Date: 2011-01-05T21:59:06+09:00 Subject: Ruby, rubygame, eventmachine Hey guys. I've been doing stuff with rubygame library where I limited ticks to 60 per second using @clock.target_framerate = 60. I need to implement eventmachine to handle UDP connections to the server. The problem is that I can't seem to get the whole idea of EventMachine::run. I want to schedule receiving and sending data in my main loop so that every 2 loops it recieves data from the buffer (receive_data would just put everything into the buffer) and at the end of the same loop it sends data to the server. Since UDP sockets in ruby 1.9.2 (at least on my computer) are not working in nonblocking mode I'm trying to do the job with the EventMachine. EM.add_periodic_timer is too slow because it doesn't get any faster than maybe 0.2 s and EM.tick_loop isn't even recognized. Help me out. -- Posted via http://www.ruby-forum.com/.