Re: Setting socket options: so many, uhh, options!

2016-09-15 Thread Arne Goedeke
I just did merge those features into pike 8.1. My impression was, that the discussion was pretty much settled. I think the current API is also in line with how similar features work (e.g. linger). I have also added Stdio.getprotobyname() to be able to access options on other levels. arne On

Re: Setting socket options: so many, uhh, options!

2015-05-07 Thread Arne Goedeke
I think we should merge this into 8.1. The setsockopt + constants seems like the minimally useful api to me. it also has the benefit of not having to wait for a new pike version in order to use that fancy new kernel feature. any objections? arne On 05/04/15 19:12, Chris Angelico wrote: On Tue,

Re: Setting socket options: so many, uhh, options!

2015-05-04 Thread Chris Angelico
On Tue, May 5, 2015 at 3:08 AM, Stephen R. van den Berg s...@cuci.nl wrote: Chris Angelico wrote: Separately to the REUSE* questions, I've been experimenting today with the IP_TOS settings, and to that end, dusted off this branch. The change is taking effect - I can see it in my outgoing logs -

Re: Setting socket options: so many, uhh, options!

2015-05-03 Thread Chris Angelico
On Tue, Mar 10, 2015 at 10:33 PM, Stephen R. van den Berg s...@cuci.nl wrote: Chris Angelico wrote: On Tue, Mar 10, 2015 at 10:05 PM, Mirar @ Pike developers forum 10...@lyskom.lysator.liu.se wrote: Wait, I said REUSEPORT? What's the difference to REUSEADDR? Mysteries of TCP sockets...

Re: Setting socket options: so many, uhh, options!

2015-03-10 Thread Stephen R. van den Berg
Mirar @ Pike developers forum wrote: So far people only seem to have used KEEPALIVE and NODELAY? (And linger?) I merely meant I don't like functions to vanish just because the underlaying OS doesn't support them. I'd rather have the return error. I'm not sure what other flags are useful or can

Re: Setting socket options: so many, uhh, options!

2015-03-10 Thread Mirar @ Pike developers forum
a. A primary thin wrapper around setsockopt(). b. Some secondary convenience functions for people unfamiliar with setsockopt(2) only for those options which are commonly used. aka both? Sure! Doesn't bother me! :) I like the convenience functions because then you don't have to bother

Re: Setting socket options: so many, uhh, options!

2015-03-10 Thread Mirar @ Pike developers forum
So far people only seem to have used KEEPALIVE and NODELAY? (And linger?) I merely meant I don't like functions to vanish just because the underlaying OS doesn't support them. I'd rather have the return error. I'm not sure what other flags are useful or can be used. FASTOPEN? REUSEPORT? buffer

Re: Setting socket options: so many, uhh, options!

2015-03-10 Thread Stephen R. van den Berg
Mirar @ Pike developers forum wrote: a. A primary thin wrapper around setsockopt(). b. Some secondary convenience functions for people unfamiliar with setsockopt(2) only for those options which are commonly used. aka both? Sure! Doesn't bother me! :) I like the convenience functions

Re: Setting socket options: so many, uhh, options!

2015-03-10 Thread Chris Angelico
On Tue, Mar 10, 2015 at 10:05 PM, Mirar @ Pike developers forum 10...@lyskom.lysator.liu.se wrote: Wait, I said REUSEPORT? What's the difference to REUSEADDR? Mysteries of TCP sockets... Here's a decent explanation, I think:

Re: Setting socket options: so many, uhh, options!

2015-03-10 Thread Stephen R. van den Berg
Chris Angelico wrote: On Thu, Feb 26, 2015 at 10:32 PM, Arne Goedeke e...@laramies.com wrote: I think we should merge this, or at least a similar API. Any objections? Haven't heard anyone else's views on this, which suggests that nobody's particularly bothered one way or the other. Which version

Re: Setting socket options: so many, uhh, options!

2015-03-10 Thread Chris Angelico
On Tue, Mar 10, 2015 at 8:17 PM, Stephen R. van den Berg s...@cuci.nl wrote: Chris Angelico wrote: On Thu, Feb 26, 2015 at 10:32 PM, Arne Goedeke e...@laramies.com wrote: I think we should merge this, or at least a similar API. Any objections? Haven't heard anyone else's views on this, which

Re: Setting socket options: so many, uhh, options!

2015-03-09 Thread Chris Angelico
On Thu, Feb 26, 2015 at 10:32 PM, Arne Goedeke e...@laramies.com wrote: I think we should merge this, or at least a similar API. Any objections? Haven't heard anyone else's views on this, which suggests that nobody's particularly bothered one way or the other. Which version of the API do you

Re: Setting socket options: so many, uhh, options!

2015-02-26 Thread Arne Goedeke
I think we should merge this, or at least a similar API. Any objections? Arne On 08/28/14 19:07, 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

Setting socket options: so many, uhh, options!

2014-08-28 Thread Chris Angelico
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.

Re: Setting socket options: so many, uhh, options!

2014-08-28 Thread Stephen R. van den Berg
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

Re: Setting socket options: so many, uhh, options!

2014-08-28 Thread Lance Dillon
Just throwing this out there, some modules have the functions present regardless, and return a message or error code saying it isn't implemented if it wasn't compiled in.  So another option is to have all the methods present, and either return a message or error code, or throw an exception, and

Re: Setting socket options: so many, uhh, options!

2014-08-28 Thread Stephen R. van den Berg
Lance Dillon wrote: Just throwing this out there, some modules have the functions present regardless, and return a message or error code saying it isn't implemented if it wasn't compiled in.? So another option is to have all the methods present, and either return a message or error code, or