On 17/07/13 18:44, Glyph wrote:

Anyhow, I think this certainly means a ticket should be filed for
introducing some API - but it seems that a little more discussion
about what the API should be will still be necessary.

Agreed.  But then, it's been a couple days and nobody else has
contributed to this thread :-).

Well, since I started it...

Some kind of endpoint argument might be problematic for some use-cases. In particular, Twisted would have to know how to convert the argument into the value to pass into setsockopt() and possibly in a platform-specific way.

The API as presented also omits the SOL.

I guess it might be ok if there was a way to reliably inject unknown options with arbitrary payloads, but I'm struggling to see a clean way to do this with a "parse a string"-style API.

So, vote me +0.5 for a "pre-connect" function.

But but but...

It might be possible to sidestep this entire issue by providing a clean way for an app to inject itself "above" the socket. I can think of a few use-cases for this, most notably things like cmsg/IP_HDRINCL which Twisted doesn't know about, and thus can't handle.

So maybe the correct way to handle this is "implement your own FD object"?

_______________________________________________
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Reply via email to