Return-Path: X-Original-To: apmail-httpd-modules-dev-archive@minotaur.apache.org Delivered-To: apmail-httpd-modules-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0D656104B6 for ; Fri, 8 Nov 2013 01:17:31 +0000 (UTC) Received: (qmail 39875 invoked by uid 500); 8 Nov 2013 01:17:30 -0000 Delivered-To: apmail-httpd-modules-dev-archive@httpd.apache.org Received: (qmail 39819 invoked by uid 500); 8 Nov 2013 01:17:30 -0000 Mailing-List: contact modules-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: modules-dev@httpd.apache.org Delivered-To: mailing list modules-dev@httpd.apache.org Received: (qmail 39810 invoked by uid 99); 8 Nov 2013 01:17:29 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Nov 2013 01:17:29 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jtleight@udel.edu designates 209.85.216.176 as permitted sender) Received: from [209.85.216.176] (HELO mail-qc0-f176.google.com) (209.85.216.176) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Nov 2013 01:17:22 +0000 Received: by mail-qc0-f176.google.com with SMTP id s19so1177742qcw.7 for ; Thu, 07 Nov 2013 17:17:01 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=/ka2Mp7LbpNwrIhq3JjTiqlawWgyJhkNfIJpvgSmd5I=; b=jqRF9+W+G/OoS73JyUenjRd/XQYbvcnOZzbCyK17rf2lUp2lxrsAHVk/e2LU4ElgiR E7f/uBAAkTefn/7uKhmNUCMK2jQNqSFe71pLw7YgebNQep6uPef5zmkjmkRGJooLda8J cJXS1S4HmBHMfgyQe6cQPBIIOeeTFwYacLIVMpsKxQMP6T5LFUOdTipI1bLD6exrof/k vcX6hqqaGmwP269Xkz71tUMhzuEzWhZP4fWkuXF6I6w77wOgngnD5E21eMqFdOal+lkg ys6m1Y1PuuXAI6HE0/+MNRXQXAIRPzUxkxbP+I8GcJF4L+7CynbS4eNaQ8ZlaobIbCQX LeKA== X-Gm-Message-State: ALoCoQn8GwjusG5sV1FXPMbQq1cGZOqW8JA9gUHiVthQ5At960dyOisLNxK5ezz/90lOnHG6z/3H X-Received: by 10.49.35.15 with SMTP id d15mr18225046qej.16.1383873421117; Thu, 07 Nov 2013 17:17:01 -0800 (PST) Received: from imac-24.home (pool-173-75-221-244.phlapa.fios.verizon.net. [173.75.221.244]) by mx.google.com with ESMTPSA id 4sm16335794qak.11.2013.11.07.17.17.00 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 07 Nov 2013 17:17:00 -0800 (PST) Message-ID: <527C3B8C.6060701@udel.edu> Date: Thu, 07 Nov 2013 20:17:00 -0500 From: "Jonathan T. Leighton" User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Thunderbird/24.0.1 MIME-Version: 1.0 To: modules-dev@httpd.apache.org Subject: Re: Can a module control the socket transport protocol? - revisited References: <527AB0EF.9060201@udel.edu> In-Reply-To: <527AB0EF.9060201@udel.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org I think the answer to my question is sort of, but not really. It appears that httpd can support alternate network transport protocols within strict limits. The MPMs (at least prefork, worker, and event), all call ap_setup_listeners() to set various socket options, bind(), and listen() on all the sockets in the global variable ap_listeners, before setting up polling. If you want to use something other than TCP, and if you're content to, and able to, have your sockets use the same socket option settings, bind(), and listen() calls that are used for TCP sockets, then you just need to create a configuration command that creates and adds your sockets to ap_listeners. There is an additional concern that the Listen configuration command naturally assumes it's the only game in town. When it tries to reuse old listeners, it only checks the address and port - not the transport protocol. Thus, it could try to reuse a TCP socket that you wanted changed to another protocol, or vice verse. This isn't really supporting alternate network transport protocols. - Jon Leighton On 11/6/13 4:13 PM, Jon Leighton wrote: > I'm revisiting this question (from several months ago), primarily > because I know more now that I did then - though still not enough. :) > > There are a couple places in the httpd code that state or imply that > httpd is not restricted to TCP - that other network transport > protocols can be used. In particular, core.c:register_hooks() > explicitly mentions other modules installing alternate network > transports, and http_connection.h mentions the > "install_network_transport" hook. I haven't been able to find any > information at all on the "install_network_transport" hook, and I'm > wondering if the comment is actually meant to refer to alternatives to > HTTP, rather than TCP. > > I'm also wondering if the comment in core.c refers only to the "core" > being network transport agnostic, and implies nothing about the MPMs, > which appear to me to be effectively hard coded to TCP. > > Is it possible to add a loadable module to an MPM? If not, then it > seems like the only option is to create my own MPM. If so, then the > trick would be to get any sockets I create into the MPM's list of > listening sockets, so they can be polled - but even that doesn't seem > possible. The problem as I see it is that one of the key variables > (the number of listening sockets), is private to the MPM. > > Does anyone really know if httpd can support alternate transport > protocols? Does the comment in core.c simply indicate that the "core" > is network transport agnostic, and imply nothing about the MPMs? > > Thanks for any help/comments on this. > > - Jon Leighton