From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id FAA04565; Fri, 15 Aug 2003 05:41:43 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id FAA24465 for ; Fri, 15 Aug 2003 05:41:41 +0200 (MET DST) Received: from mx2out.umbc.edu (mx2out.umbc.edu [130.85.25.11]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h7F3fef09950 for ; Fri, 15 Aug 2003 05:41:40 +0200 (MET DST) Received: from allhosts (pcp01740998pcs.howard01.md.comcast.net [68.54.82.221]) by mx2out.umbc.edu (8.12.8/8.12.8/UMBC-Central 1.11 mxout 1.2.2.3 $) with ESMTP id h7F3fcmV006283 for ; Thu, 14 Aug 2003 23:41:38 -0400 (EDT) Subject: [Caml-list] closing sockets From: Mike Furr To: caml-list@inria.fr Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-fXuI4PrRlw0gIINjzIur" Message-Id: <1060918898.24424.19.camel@orthrus> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.3 Date: 14 Aug 2003 23:41:38 -0400 X-AvMilter-Key: 1060919199:47abf898819639b16c696d47f474b0b4 X-Avmilter: Message Skipped, too small X-Processed-By: MilterMonkey Version 0.9 -- http://www.membrain.com/miltermonkey X-Loop: caml-list@inria.fr X-Spam: no; 0.00; 'open:01 descriptor:01 con:99 allocations:01 erred:01 ocaml:01 caml:01 descriptors:01 sockets:01 namely:02 annoying:03 explicitly:03 intuitive:04 app:04 seems:05 X-Attachments: type="application/pgp-signature" name="signature.asc" Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk --=-fXuI4PrRlw0gIINjzIur Content-Type: text/plain Content-Transfer-Encoding: quoted-printable 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.=20 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] --=20 Mike Furr --=-fXuI4PrRlw0gIINjzIur Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) iD8DBQA/PFZy7ZPKKRJLJvMRAiqHAJsGd2r5CE5EviOn1xg9bmrtYMUFawCeO/h8 Z9/3UuHLFuLs6a9AsghnoNg= =jFEd -----END PGP SIGNATURE----- --=-fXuI4PrRlw0gIINjzIur-- ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners