Re: Review of gnio, round 1
- From: Dan Winship <danw gnome org>
- To: Ryan Lortie <desrt desrt ca>
- Cc: gtk-devel-list <gtk-devel-list gnome org>, gicmo gnome org, Alexander Larsson <alexl redhat com>
- Subject: Re: Review of gnio, round 1
- Date: Mon, 27 Apr 2009 11:55:32 -0400
Ryan Lortie wrote:
> Not sure I agree. See shutdown() syscall. The fact that this call
> exists means that the designers of [unix or tcp or whatever] went out of
> their way because they disagreed with you.
I can't think of any time I've used SHUT_RD or SHUT_WR rather than
SHUT_RDWR though...
>> Furthermore, its actually a problem in the ipv4 vs ipv6 magic case. The
>> current tcplistener code first tries to do an ipv6 socket and only if
>> that fails it tries an ipv4 socket. This makes sense on linux, were an
>> ipv6 socket also can accept ipv4 connections. However, this is not true
>> on many other unixes, where you need two sockets to handle both ipv4 and
>> ipv6. So in this case the listener object actually gets in the way, as
>> we'd need to create two listener objects to handle this (or make the
>> listener have two sockets).
>
> The 4-over-6 functionality (and even the setsockopt to disable it) is
> specified in some RFC somewhere.
Right, but it's disabled (at the kernel level) by default on most OSes
(everything but Linux?) because apparently the behavior is
underspecified. (Eg, see
http://www.potaroo.net/ietf/idref/draft-cmetz-v6ops-v4mapped-api-harmful/.)
So to avoid separate Linux-vs-everyone-else codepaths, it's probably
best to use IPV6_V6ONLY and manage v4 and v6 sockets separately everywhere.
-- Dan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]