apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <traw...@attglobal.net>
Subject Re: Patches for bug found in APR sockets
Date Fri, 05 Dec 2003 01:04:29 GMT
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)


Mime
View raw message