Re: httplib again...

Dag Gruneau (dg@preseco.comm.se)
25 Jan 1995 09:08:59 GMT

>
> Under NT, socket handles are consider OS handles (i.e. the same type returned
> by kernel calls lile CreateFile()). The function _open_osfhandle() is provided
> to take an OS handle and create a C file handle from it. The 0 I am passing in
> is for READ mode, perhaps I need to spend some more time to see what exactly
> is doing on there.

The manual entry on _open_osfhandle says:

"Associates a C run-time file handle with an existing operating
system file handle."

To mee it seems like only an association is done, i.e. no copy.
This means when the filedescriptor returned by _open_osfhandle
is closed the socket is closed. To act the same ways as the UNIX
code you have to dup() the filedescriptor.

/Dag