caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Mike Furr <mike.furr@umbc.edu>
To: caml-list@inria.fr
Subject: [Caml-list] closing sockets
Date: 14 Aug 2003 23:41:38 -0400	[thread overview]
Message-ID: <1060918898.24424.19.camel@orthrus> (raw)

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

Hi all,

I've been playing around with developing a network app in ocaml and came
across an annoying 'misunderstaning' of the documentation.  Namely,
'shutdown_connection' does not clean up after 'open_connection'.  While
the socket is shutdown, the file descriptor is not closed and thus must
be done so explicitly, else you can quickly run out of file
descriptors... :(

It seems that it would be more intuitive(as a high level networking
function) if shutdown_con also closed the socket, effectively undoing
the allocations of open_con.  In fact, the networking example in this
book[1] does not do this, which is how I erred in the first place. 

I'm not networking/socket expert, so, is there any reason for this not
to occur?  The only problem I see is that making the change would break
any program that correctly closes the socket on its own...

thanks,

[1] Developing Applications With Objective Caml[english translation]
-- 
Mike Furr <mike.furr@umbc.edu>

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

             reply	other threads:[~2003-08-15  3:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-15  3:41 Mike Furr [this message]
2003-08-15 12:28 ` Richard Jones

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=1060918898.24424.19.camel@orthrus \
    --to=mike.furr@umbc.edu \
    --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).