caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* behaviour of Unix.shutdown_connection
@ 2001-02-12 13:52 Alan Schmitt
  2001-02-15 10:43 ` [Caml-list] " Xavier Leroy
  0 siblings, 1 reply; 2+ messages in thread
From: Alan Schmitt @ 2001-02-12 13:52 UTC (permalink / raw)
  To: caml-list

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 ? 

Si j'ouvre une connexion avec Unix.open_connections, et la ferme avec
Unix.shutdown_connection, est-il nécessaire que je ferme les deux
canaux par close_in et close_out ?

Amicalement,

Alan Schmitt

--
The hacker: someone who figured things out and made something cool happen.



^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Caml-list] Re: behaviour of Unix.shutdown_connection
  2001-02-12 13:52 behaviour of Unix.shutdown_connection Alan Schmitt
@ 2001-02-15 10:43 ` Xavier Leroy
  0 siblings, 0 replies; 2+ messages in thread
From: Xavier Leroy @ 2001-02-15 10:43 UTC (permalink / raw)
  To: caml-list, Alan.Schmitt

> 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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-02-15 10:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-02-12 13:52 behaviour of Unix.shutdown_connection Alan Schmitt
2001-02-15 10:43 ` [Caml-list] " Xavier Leroy

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).