Chris Angelico wrote:
>Topic branch: rosuav/sockopt
>Per Lance's suggestion, I've made a generic setsockopt() function. It
>works only with integers, so it's not suitable for SO_LINGER, which
>therefore should stay the way it is (linger() takes a magic parameter
>of -1), but it works for any of the simple boolean options.
You could add a void|mixed optval second argument which is suitably
interpreted depending on
the option at hand.
>I'd rather make it as easy as possible on the Pike code. Which way
>makes more sense?
I would prefer the compile-time checks for efficiency reasons.
--
Stephen.