Subject: Re: Support for userspace TCP/IP stacks

Re: Support for userspace TCP/IP stacks

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 22 Feb 2016 00:14:37 +0100 (CET)

On Thu, 18 Feb 2016, Avi Kivity wrote:

> My intent was on not requiring recompilation or ifdefs, so a single shared
> library can work for both the standard socket API and user-space TCP/IP
> stacks. I somehow missed that ares_socket_t is a public type :(.
>
> So instead of this, I'd make a new ares_internal_socket_t which will be used
> in ares_private.h. The public interface will only use ares_socket_t, while
> privately we'll be using a struct wrapper around it. The intent is that we
> don't accidentally call a socket API on an ares_internal_socket_t.

I don't think many of us think it would be fine to penalize the normal users
nor to complicate the code much in order to enable this, so I think it would
depend on exactly how you intend to have it done.

-- 
  / daniel.haxx.se
Received on 2016-02-22