From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <002801c34750$47015010$3f00a8c0@MERCURY> From: "Andrew Simmons" To: <9fans@cse.psu.edu> Subject: [9fans] Fork: useless and painful? MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Date: Fri, 11 Jul 2003 14:01:00 +1200 Topicbox-Message-UUID: f4dcdc6e-eacb-11e9-9e20-41e7f4b1d025 >Not to mention the fact that you have to send/receive on sockets >and read/write on everything else so that an app has to check >the type of any handles it is passed so that it can use the >right calls. Actually, under Winsock2 you can use ReadFile/WriteFile with sockets as well as file handles. You can also use WaitForMultipleObjects, not on the socket handle itself, but on an event object which is triggered when eg there is data available for reading. Admittedly you'd never know this from the documentation, which says you have to use WSAWaitForMultipleEvents, and use WSAEvents rather than regular Windows events. The main problem I have with Windows is not the bazillion parameters for each function call, which you soon learn to ignore, but the fact that it seems to consist of a random collection of constantly changing APIs designed, if that's the right word, by different groups of people who never talked to each other about things such as a uniform method for reporting errors.