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 05/07

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 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 - >>alt

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

2015-05-04 Thread Stephen R. van den Berg
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 - >although whether it actually improves performance or not is another >quest

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 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... > >>htt

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

2015-03-10 Thread Stephen R. van den Berg
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... >http://stackoverflow.com/questions/14388706/socket-options-so-reuseaddr-and-s

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: http://stackoverflow.com/questions/14388706/socket-options-so-reu

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

2015-03-10 Thread Mirar @ Pike developers forum
Wait, I said REUSEPORT? What's the difference to REUSEADDR? Mysteries of TCP sockets... >Then, if someone actually finds himself using the more obscure ones, >they can then send in a feature request for yet another convenience >function. Yep.

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 c

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 si

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 convenienc

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 t

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

2015-03-10 Thread Stephen R. van den Berg
Chris Angelico wrote: >> What about: >> 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! :) Yes, but be reluctant in adding

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 wrote: > Chris Angelico wrote: >>On Thu, Feb 26, 2015 at 10:32 PM, Arne Goedeke 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'

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 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

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 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 want? Dedicated func

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 >

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

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
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

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.