Message303034
On Windows, exceptfds of select() is not only related to urgent ("out of band") data, it also notifies connect() failure:
exceptfds:
If processing a connect call (nonblocking), connection attempt failed.
OOB data is available for reading (only if SO_OOBINLINE is disabled).
https://msdn.microsoft.com/en-us/library/windows/desktop/ms740141(v=vs.85).aspx
I'm not sure that we can easily simplify the third parameter of select() as "urgent data". The exact semantics seems to not be portable at all.
poll() describes better the event types. Extract of my local Linux poll() manual:
POLLPRI: "There is urgent data to read (e.g., out-of-band data on TCP socket; pseudoterminal master in packet mode has seen state change in slave)."
POLLERR: "Error condition (only returned in revents; ignored in events)."
POLLHUP: "Hang up (only returned in revents; ignored in events). Note that when reading from a channel such as a pipe or a stream socket, this event merely indicates that the peer closed its end of the channel. Subsequent reads from the channel will return 0 (end of file) only after all outstanding data in the channel has been consumed."
etc. |
|
Date |
User |
Action |
Args |
2017-09-26 12:10:08 | vstinner | set | recipients:
+ vstinner, pitrou, neologix, yselivanov, pklanke |
2017-09-26 12:10:08 | vstinner | set | messageid: <1506427808.56.0.952396847769.issue30844@psf.upfronthosting.co.za> |
2017-09-26 12:10:08 | vstinner | link | issue30844 messages |
2017-09-26 12:10:08 | vstinner | create | |
|