9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Charles Forsyth <charles.forsyth@gmail.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 15:51:11 +0000	[thread overview]
Message-ID: <CAOw7k5iHj6M4KHqwTMORTPjQhugaxDSudUPr7OXCj-Xn1Y6+Wg@mail.gmail.com> (raw)
In-Reply-To: <A4DEBBC9-A67A-4AC3-B631-5E1F87D0CBBF@bitblocks.com>

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

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: 1110 bytes --]

  reply	other threads:[~2017-02-05 15:51 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 [this message]
2017-02-05 15:54             ` Charles Forsyth
2017-02-05 18:13               ` Bakul Shah
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=CAOw7k5iHj6M4KHqwTMORTPjQhugaxDSudUPr7OXCj-Xn1Y6+Wg@mail.gmail.com \
    --to=charles.forsyth@gmail.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).