From: Randy General Date: 2009-11-20T19:23:59+09:00 Subject: Re: UDP Proxy Hi Brian, > I suspect what you're trying to do is handle > a --> proxy --> b > and > a <-- proxy <-- b "It also seems strange to me your requirement that if the proxy is listening on port X, then it must also send with a source port of X. That's not normally a requirement for a proxy, but then you haven't really said much about the protocol itself." I was mistaken there, what I meant to say was what you diagramed later where the source ports, while different on each side, remained consistent for each client. > Anyway, in your code, life would be much easier if you bound two > different sockets (either on different ports, or on different IPs). > > X Y > a ------> proxy -------> b > > because you could select() on the two sockets, and easily distinguish > outbound from return packets. Great, thanks for the suggestion. I was trying to think of how to deal with outgoing packet for which there's no response, that will hopefully take care of it. I'll post what I come up with in here shortly. Thanks for all of your help! -- Posted via http://www.ruby-forum.com/.