Nick Mathewson wrote:
I'm pretty sure John is asking about UDP support under bufferevents.
That's nontrivial.
The last time I looked, it appeared that the socket-backed
bufferevent code was almost exactly right for a UDP transition, but
that the underlying evbuffer objects didn't have a lot of sensible
overlap in their API. Internally, evbuffers are optimized for
stream-oriented data, and it's not easy to come up with an elegant way
to make them handle packet-oriented data instead, especially if you
want the packet-oriented data to come with optional addresses (to
support unconnected UDP sockets with sendfrom/recvto), and you want to
avoid excessive copy operations, and you don't want to need one malloc
per packet.
To add a further wrinkle, it would be wonderful if it was possible to
support DTLS with UDP bufferevents, in the same way that it's currently
possible to support TLS with TCP bufferevents. I have some plans to use
DTLS in the distant future, although not any time soon. But it would be
nice to at least not preclude this possibility.
--Patrick
***********************************************************************
To unsubscribe, send an e-mail to majord...@freehaven.net with
unsubscribe libevent-users in the body.