caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Xavier Leroy <Xavier.Leroy@inria.fr>
To: caml-list@inria.fr, Alan.Schmitt@inria.fr
Subject: [Caml-list] Re: behaviour of Unix.shutdown_connection
Date: Thu, 15 Feb 2001 11:43:08 +0100	[thread overview]
Message-ID: <20010215114308.B6063@pauillac.inria.fr> (raw)
In-Reply-To: <20010212145231.B8694@alan-schm1p.inria.fr>; from alan.schmitt@inria.fr on Mon, Feb 12, 2001 at 02:52:31PM +0100

> If I open a connection with Unix.open_connection, and shut it down
> with Unix.shutdown_connection, do I still need to call close_in and
> close_out on the two channels ? 

Yes.  Basically, shutdown_connection just sends an "end of file"
condition to the program connected to the socket on the other side.
The other program can then finish sending what it has to send, then close
its side of the socket.  On receiving an "end of file" on your side,
your program knows that the data exchange is over and can (and must)
then close the descriptors on its side.

- Xavier Leroy
-------------------
To unsubscribe, mail caml-list-request@inria.fr.  Archives: http://caml.inria.fr


  reply	other threads:[~2001-02-15 10:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-12 13:52 Alan Schmitt
2001-02-15 10:43 ` Xavier Leroy [this message]
2001-02-15 14:20 [Caml-list] " Damien Doligez
2001-02-15 14:35 ` Daniel de Rauglaudre

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=20010215114308.B6063@pauillac.inria.fr \
    --to=xavier.leroy@inria.fr \
    --cc=Alan.Schmitt@inria.fr \
    --cc=caml-list@inria.fr \
    /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).