From: Donal K. F. <don...@ma...> - 2012-08-30 08:48:53
|
On 30/08/2012 09:09, Alexandre Ferrieux wrote: > On Wed, Aug 29, 2012 at 1:29 PM, Stuart Cassoff <st...@be...> wrote: >> Duft has been updated to do more stuff and now has documentation and examples. >> Duft is the inet4 datagram guts of Ceptcl, more-or-less. > > Then Duft might well be the basis for the reference implementation of > TIP 409, provided that you modify the API to comply. > You're obviously welcome as co-author of the TIP in that case. About the only constraint I'd lay strongly is that the UDP code should be largely transparent to whether it is going over IPv4 or IPv6. Having persuaded [socket] to do the right thing and support both (with users hardly ever having to know the difference) we'd be duft^W daft[*] to not make our official UDP support do the same from the beginning. That's assuming that the only differences are in the IP header and possibly the packet length, of course. >> Things that remain to be done include more tests, C interface + docs + tests, >> maybe some Tcl library code, fix the ensembles, inet6, other stuff. > > Sure. The only nonobvious thing I can see to day, is to make the APIs > agree first ;) > > Note that you are perfectly legitimate to have strong opinions against > the TIPped API; but in that case, it would be more effective to voice > your objections (like others did) here, so that we can agree to > disagree by discussion rather than by independent release of code. I'd view Stuart's experience as being particularly valuable. In general, pure syntactic differences (e.g., argument ordering, whether to use [$handle op] or [op $handle]) aren't a big deal as they're easy to script around. It's the semantic problems (if they exist) that need to be dealt with as they're much trickier to fix by layering. That said, the main difference I see is that Duft[**] also includes synchronous receive and support for raw sockets. The former seems sensible to me, and the latter is out of scope for Tcl (because you usually need elevated privileges to make them). I'm guessing that a meld of Duft and the techniques used in [socket] to (mostly) transparently support IPv4 and IPv6 at the same time would be really good (it starts with switching from gethostbyname() to getaddrinfo(), and follows up with handling the multiple address issue). The main worry is whether we can make the notifier work on Windows. (Yeah, we have to support that platform family...) Donal. [* What can I say? The chance to pun was too good to miss. :-) ] [** https://sourceforge.net/p/duft/code/?branch=ref%2Ftip is what I've been looking at. ] |