On 8 Mar 2016, at 10:43, Jan Kaluža <[email protected]> wrote: > On 03/08/2016 10:25 AM, Yann Ylavic wrote: >> On Tue, Mar 8, 2016 at 9:46 AM, Yann Ylavic <[email protected]> wrote: >>> On Tue, Mar 8, 2016 at 9:28 AM, Jan Kaluža <[email protected]> wrote: >>>> >>>> I have chosen FreeListen over the flags >>> >>> FWIW, should be take the YAD path, I'd prefer ListenFree (over >>> FreeListen) to emphasize on the "Listen directive family" with a >>> prefix... >> >> Thinking more about this, I think I second Jim on the wish to have a >> single Listen directive with some parameter like >> "options=freebind,backlog:4095,reuseport,...". > > Thinking about right syntax for options... > > I would personally like something like "Listen [IP-address:]portnumber > [protocol] [option1] [option2] ...". Do we have list of supported protocols > by Listen directive, or we support whatever protocol is there? > > If we have explicit list of protocols, then the protocols itself could become > an options. > > If not, can it be acceptable, that you always have to define protocol when > you wan to use options?
That sounds fine too. One proviso comes with the idea of a single socket that can serve several protocols. Think of WebSocket, because it is awkward: from an HTTP point-of-view, the protocol is initially HTTP and then upgrades to WebSocket; however, from a WebSocket point of view, the protocol is WebSocket throughout with a preamble that also happens to resemble HTTP/1.1. Using the first model, only one protocol need be specified (but it's not clear which upgrades are valid for this socket). Using the second model, the Listen directive needs a way for the admin to specify multiple protocols. Maybe the answer is for that to be set in the Protocols directive only? What should the Listen directive look like, ideally, for a freebind-enabled socket that can be either HTTP or WebSocket, and needs to specify options? Like this perhaps: Listen [2001:db8::a00:20ff:fea7:ccea]:1234 http/1.1,websocket options=freebind -- Tim Bannister – [email protected]
