* [Caml-list] closing sockets
@ 2003-08-15 3:41 Mike Furr
2003-08-15 12:28 ` Richard Jones
0 siblings, 1 reply; 2+ messages in thread
From: Mike Furr @ 2003-08-15 3:41 UTC (permalink / raw)
To: caml-list
[-- 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 --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Caml-list] closing sockets
2003-08-15 3:41 [Caml-list] closing sockets Mike Furr
@ 2003-08-15 12:28 ` Richard Jones
0 siblings, 0 replies; 2+ messages in thread
From: Richard Jones @ 2003-08-15 12:28 UTC (permalink / raw)
To: Mike Furr; +Cc: caml-list
For sockets, "shutdown" and "close" are two different things. Have a
look at a book like Steven's UNIX Network Programming for details.
Rich.
--
Richard Jones. http://www.annexia.org/ http://freshmeat.net/users/rwmj
Merjis Ltd. http://www.merjis.com/ - all your business data are belong to you.
'There is a joke about American engineers and French engineers. The
American team brings a prototype to the French team. The French team's
response is: "Well, it works fine in practice; but how will it hold up
in theory?"'
-------------------
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-08-15 12:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-15 3:41 [Caml-list] closing sockets Mike Furr
2003-08-15 12:28 ` Richard Jones
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox