9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Bakul Shah <bakul@bitblocks.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] adding TCP half-duplex close
Date: Sun,  5 Feb 2017 10:13:06 -0800	[thread overview]
Message-ID: <7228BDDF-8FE9-4E7B-B1AE-4BD046B4B814@bitblocks.com> (raw)
In-Reply-To: <CAOw7k5hu51E9jTvO5PKt=-eEqwFd42kFHBVTiejSkA=XZLa_vw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1476 bytes --]

If they implement close correctly, they should be able to implement close-read correctly, it being a pure subset. In theory :-)

As for SYN+data+FIN you had to have both sides properly implement rfc1644 or the T/TCP extension. This extension was deprecated at least by 2004 due to "the ease of DoS attacks that can result". Might want to take a look at a recent TCP roadmap RFC such as rfc7414!

> On Feb 5, 2017, at 7:54 AM, Charles Forsyth <charles.forsyth@gmail.com> wrote:
> 
> It's a similar story with SYN+data+FIN to provide a basic reliable datagram. You can't rely on a consistent implementation (unless it's to defeat your purpose).
> 
>> On 5 February 2017 at 15:51, Charles Forsyth <charles.forsyth@gmail.com> wrote:
>> 
>>> On 5 February 2017 at 05:23, Bakul Shah <bakul@bitblocks.com> wrote:
>>> I think shutdown(sock, SHU_RD) is mainly to let the sender generate an SIGPIPE signal in case it has sent data on a closed direction of a connection. But I think this is only for completeness. Almost always you’d use close(sock). At least I have not found a usecase when I’d want to shutdown the read-end but continue sending on write-end. 
>> 
>> Yes. That's roughly what I tried to do with my network pipe, but at least at the time, target systems differed (as they were apparently allowed) as to whether they reliably delivered data or simply flushed it, so in the end I had to add some protocol to ensure it, and didn't need the "feature".
> 

[-- Attachment #2: Type: text/html, Size: 2554 bytes --]

  reply	other threads:[~2017-02-05 18:13 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-04  1:56 Skip Tavakkolian
2017-02-04  6:29 ` Bakul Shah
2017-02-05  4:24   ` Skip Tavakkolian
2017-02-04  9:58 ` Charles Forsyth
2017-02-04 10:11   ` Charles Forsyth
2017-02-04 10:13     ` Charles Forsyth
2017-02-05  4:39       ` Skip Tavakkolian
2017-02-05  5:23         ` Bakul Shah
2017-02-05 15:51           ` Charles Forsyth
2017-02-05 15:54             ` Charles Forsyth
2017-02-05 18:13               ` Bakul Shah [this message]
2017-02-05 21:48                 ` Charles Forsyth
2017-02-10  8:49                   ` Skip Tavakkolian
2017-02-12  3:28                     ` Skip Tavakkolian
2017-02-05  7:54         ` Fran. J Ballesteros
2017-02-05  4:16   ` Skip Tavakkolian

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7228BDDF-8FE9-4E7B-B1AE-4BD046B4B814@bitblocks.com \
    --to=bakul@bitblocks.com \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).