| 261 | require_within_body_cap(); |
| 262 | // A chunk is handed out in windows rather than all at once. Reads that stay |
| 263 | // inside the published get area never re-enter underflow(), so publishing a |
| 264 | // whole 8 MiB chunk would let the body keep advancing across many model |
| 265 | // iterations without the deadline ever being consulted again. Windowing puts |
| 266 | // a bound on how far past the deadline consumption can get. |
| 267 | if (publish_window()) { |
| 268 | return traits_type::to_int_type(*gptr()); |
| 269 | } |
| 270 | if (!next_chunk()) { |
| 271 | return traits_type::eof(); |
| 272 | } |
| 273 | return traits_type::to_int_type(*gptr()); |
| 274 | } |
| 275 | |
| 276 | private: |
| 277 | // poll() rather than select(): an accepted descriptor can be >= FD_SETSIZE |
| 278 | // once enough connections are open, and FD_SET on such a descriptor is |
| 279 | // undefined behaviour that corrupts the stack. |
nothing calls this directly
no test coverage detected