From: Randy General Date: 2009-11-20T18:06:41+09:00 Subject: Re: UDP Proxy Hi David, Thanks for responding. > Question #1: Would port forwarding work for this? It looks like a simple > DNAT > filter on Linux, for example. It might, but this is more so just to try and code something difficult, rather than trying to find the easiest solution to achieve it. I don't have any legitimate need for the end result. > Question #2: If you've got an implementation in C, why do you need one > in > Ruby? If you're wanting to do fancier things in Ruby, would it work to > use the > C version as a library? Same reason as above, but another problem is that the C version is coded exclusively for Windows, and I'd like to achieve this on Linux (trying to learn Linux simultaneously). > There's a few things you're doing that just feel wrong from a > performance > standpoint: Thanks for the feedback, I've made the suggested change. > Make sure you're at least using Ruby 1.9 (that's twice the speed of > 1.8), and > try JRuby. I was using Ruby 1.8.6, I'll upgrade to 1.9 now and give that a whirl. Wasn't aware that the speed difference was so dramatic. > And finally: Run it through some profiling, to see where your > bottlenecks > actually are. Haven't learned about profiling yet, but this is probably as good a time as any. I'll take a look into that and try to figure out where it's slowing down. Thanks for all of your feedback! -- Posted via http://www.ruby-forum.com/.