[tahoe-dev] uTP (low extra delay transport)

ghazel at gmail.com ghazel at gmail.com
Fri May 28 12:09:26 PDT 2010


>> uTP can be plugged in to any transport which supports
>> something that looks like recvfrom and sendto.
>
> How does the uTP event loop work? Have you tried or been able to make it
> work as a twisted ITransport?

There is a periodic call you may insert in to any event loop. Other
than that there is a function you call when you recv a packet, and you
pass it a function handle to call when it needs to send a packet. So,
in the implementation on Twisted, I use a normal Twisted UDP socket to
send an receive packets, and a task.LoopingCall to run the periodic
call. That's it.
I was able to get it running on Twisted very easily, using the direct
uTP API. I built an ITransport out of it, which wasn't too much
trouble, and even took a swing at the
Client/Server/Connection/Connector pile of objects to implement
reactor.connectUTP and reactor.listenUTP. Those have a lot of edge
cases around when the connection is lost or manually closed, which
I'll need to test, but it seems to work at a basic level.

-Greg


More information about the tahoe-dev mailing list