Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 20842 invoked from network); 5 Dec 2003 01:06:33 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 5 Dec 2003 01:06:33 -0000 Received: (qmail 36071 invoked by uid 500); 5 Dec 2003 01:06:17 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 36039 invoked by uid 500); 5 Dec 2003 01:06:16 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 36026 invoked from network); 5 Dec 2003 01:06:16 -0000 Message-ID: <3FCFD99D.1060402@attglobal.net> Date: Thu, 04 Dec 2003 20:04:29 -0500 From: Jeff Trawick Reply-To: trawick@attglobal.net User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031007 X-Accept-Language: en-us, en MIME-Version: 1.0 To: dev@apr.apache.org Subject: Re: Patches for bug found in APR sockets References: <3FB91EA3.9020508@opendemand.com> <3FC21A41.1020501@opendemand.com> <3FCCB2A5.1050005@attglobal.net> In-Reply-To: <3FCCB2A5.1050005@attglobal.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Symantec AntiVirus Scan Engine X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Jeff Trawick wrote: > The interesting question IMO is can we get rid of the unfortunate > overhead -- the preallocation of sockaddrs at socket creation time. I > believe that is required to support the ancient ideom > > apr_socket_create(&sock); > apr_socket_addr_get(&remote_addr, REMOTE, sock); > apr_sockaddr_ip_set(remote_addr, "1.2.3.4"); > apr_sockaddr_port_set(remote_addr, 80); > apr_connect(sock, NULL); > > I'll start a new thread on some networking apis to remove and give folks > a chance to holler. Once that is resolved, I suspect you'll find that > the unfortunate overhead is now worthless, and some alternative patch > can clean up that issue. sockaddr_ip_set(), sockaddr_port_set() are now gone... now is prime time to see if there is any remaining need to allocate those sockaddrs, and separately to see if any well known APR users somehow rely on those sockaddrs being preallocated (i.e., they grab local socket address from socket before it would necessarily be set)