Hi,
I'm reasonably new to programming, and Ruby is my first language. I've
been trying to work on increasingly complex projects to get a feel for
the language, but I'm hitting a wall with this one.

My goal is to make a UDP Proxy. Basically it will be initialized with an
IP (ip_x), and if any packets are sent to the proxy, it will re-send
them to ip_x, take any response ip_x sends to the packet, and return it
to the client. I've tried someone else's implementation of this in C,
and it worked quite well. However, while my code works, it's
tremendously slow. I attempted to play a game through the proxy, and it
was exceptionally slow.

Here's my code so far:

http://pastie.org/707258.txt

I'm sure the code could be a lot cleaner at the bottom, as right now it
can only support one client, among other problems, but I'm trying to
sort out the poor performance issue first. While the implementation in C
works without a hitch, even when playing a network intensive FPS, my
implementation in Ruby is tremendously slow. That brings me to my
question:

Is the poor performance of the script a result of poor coding on my
part? Or is an interpreted language like Ruby incapable of efficiently
doing this sort of task?

Thanks!
-- 
Posted via http://www.ruby-forum.com/.