From: Francis Cianfrocca Date: 2007-11-30T10:37:13+09:00 Subject: Re: Custom Protocol ------=_Part_9646_11472037.1196386636672 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Nov 29, 2007 4:18 PM, thefed wrote: > > On Nov 29, 2007, at 8:37 AM, Francis Cianfrocca wrote: > > > I took a very quick look at UDT and I think it's quite interesting. > > The > > basic approach has appeared before (people were discussing the > > "long-fat-pipe" problem in TCP even before the WWW came along), but > > I like > > the optimizations in this one. > > > > If I read their material correctly, UDT is based completely on UDP so > > there's no need for you to create another protocol at the IP level > > (analogous to TCP, UDP, ICMP, etc). That means you don't need raw > > sockets, > > which makes your task considerably easier. You don't need to > > construct the > > IP header either. > > > > Instead, implementing UDT is analogous to rebuilding TCP inside of > > sets of > > related UDP packets. Is there any particular reason you want to do > > this in > > Ruby rather than just wrapping a C or Java implementation? > > The reason I'd like to do it in Ruby is first for my comprehension of > the code. Second, the only implementation so far is in C++, and the > bindings there are pretty messy (I think). UDT + Ruby DSL = a lot > nicer, IMHO. > > As you might've seen, there is a lot of information, such as the sub- > sequence number and a variety of other things that are important and > pertain to the packets. If I didn't use raw sockets, wouldn't that > information be held in the payload? > I'm planning to look the implementation over and give it a try. Maybe even wrap it as a Ruby extension. Based on my limited reading of the spec, all of the data needed to relate packets to streams goes into the UDP packets. I'm still seeing no need for you to use raw sockets. ------=_Part_9646_11472037.1196386636672--