Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
in_channel_of_descr questions
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Christoph Bauer <christoph.bauer@l...>
Subject: in_channel_of_descr questions

I have some questions concerning in_channel_of_descr: my program
has a list of sockets. I need the sockets itself for a select-Loop
and an in_channel for the convenient input_line function. At the end,
which one should i close? Just the socket, just the channel or both?
On Windows I tried to create many in_channels, one for each block 
I read. Then I get soon an  "Too many open files in the system" error. 
In win32unix/channels.c I see an _open_osfhandle() call for each 
in_channel_of_descr. On unix the same program runs fine (as expected). 
So is there a different approach needed for windows e.g. close just 
the socket on unix, but close socket and in_channel
on windows? (In any case I'll remove the repeated call of 

Thanks for help,

Christoph Bauer