Mixing in OS-related stuff only complicates the API.
Mixing in OS-related stuff only complicates the API.
The OS used to do the networking for me. It exposes the BSD sockets API, which is pretty simple and nice but is unfortunately no longer safe to use. Yet, the kernel doesn't offer anything else.
So you're right, but you don't go far enough. It should all be in the kernel. Instead of tls_config_set_cert_file() we should be using setsockopt(2). Until we can, however, we'll have to rely on user-space libraries.
This is the second time you've said something like this today. Explain what you mean by it.
> So you're right, but you don't go far enough. It should all be in the kernel. Instead of tls_config_set_cert_file() we should be using setsockopt(2). Until we can, however, we'll have to rely on user-space libraries.
I think what you mean is that it should be in the standard library. There is no reason it should have to be in the kernel.
My compiler is most commonly used together with an editor. Still I'm glad it didn't come with an editor built-in :)
> 2) You can create file descriptors not backed by any actual network connection or file on the harddrive
Indeed. It doesn't mean it is the preferred way to do it, from a code-quality or even performance point of view.