[Python-Dev] Pervasive socket failures on Windows (original) (raw)
Thomas Wouters thomas at xs4all.net
Fri Feb 10 11:27:13 CET 2006
- Previous message: [Python-Dev] Pervasive socket failures on Windows
- Next message: [Python-Dev] Pervasive socket failures on Windows
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Fri, Feb 10, 2006 at 12:36:09AM -0500, Tim Peters wrote:
[Tim] > ... FDSETSIZE is the maximum number of distinct fd's an fdset can > hold, and the numerical magnitude of any specific fd has nothing to do > with that in general (they may be related in fact on Unix systems that > implement an fdset as "a big bit vector" -- but Windows doesn't work > that way, and neither do all Unix systems, and nothing in socket > specs requires an implementation to work that way).
Hmm. Looks like POSIX does require that. Can't work on Windows, though. I have a distinct memory of a 64-bit Unix that didn't work that way either, but while that memory is younger than I am, it's too old for me to recall more than just that ;-).
Perhaps the memory you have is of select-lookalikes, like poll(), or maybe of vendor-specific (and POSIX-breaking) extensions to select(). select() performs pretty poorly on large fdsets with holes in, and has the fixed size fdset problem, so poll() was added to fix that (by Linux and later by XPG4, IIRC.) poll() takes an array of structs containing the fd, the operations to watch for and an output parameter with seen events. Does that jar your memory? :)
(The socketmodule has support for poll(), on systems that have it, by the way.)
-- Thomas Wouters <thomas at xs4all.net>
Hi! I'm a .signature virus! copy me into your .signature file to help me spread!
- Previous message: [Python-Dev] Pervasive socket failures on Windows
- Next message: [Python-Dev] Pervasive socket failures on Windows
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]