This is the mail archive of the cygwin-developers@cygwin.com mailing list for the Cygwin project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On Fri, 2002-08-23 at 04:52, Conrad Scott wrote: > There's no comparison possible right now since the existing code ... K. > I've looked at putting in readv/writev directly for disk files > etc. (pipes and raw devices would benefit as well) but a general > solution doesn't fit very well w/ the current structure of the > fhandler classes: for example, the text-mode vs binary-mode code > and something else I can't quite remember just now :-) Yah. One thing I've been pondering for a while - strip out all the text/binary translation for non FILE calls. I have done *any* research to see if there are text-dependent apps using fd based IO, but there probably are :p. > I'd have thought that overlapped was the reverse of the Posix > select/poll model. That is, in NT you issue your IO operation and > got told when it has completed, which allows for zero-copy IO and > for queues of operations (shades of VMS indeed); Overlapped refers to capability for Win32 to have 'overlapping' IO's outstanding, not to a specific notification mechanism. The ReadFile/WSARecv interfaces support 3 interfaces I'm aware of: un-notified (select) notified via an event object (poll) notified via a completion port. > while the > select/poll model is the opposite: you get told when a read/write > would succeed if you were to do it. You can't, w/ select/poll, > issue a nonblocking IO operation and be told when it has completed > (except for the strange cases of accept and connect). And it's > not clear to me how to bridge that gap. USe WSAAsyncSelect and register for FD_WRITE and FD_READ. These get sent when a socket is ready for writing/reading. We then keep a table of the sockets we own, and update their state when we recieve the messages. Select and poll then become trivial querys into our state table. (If I misunderstood, and you wanted to emulate overlapped with select/poll - sorry :]). Rob
Attachment:
signature.asc
Description: This is a digitally signed message part
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |