Disable reading on the NetEvent @a ne. @param nh Nethandler that owns @a ne. @param ne The @c NetEvent to modify. - If write is already disable, also disable the inactivity timeout. - clear read enabled flag. - Remove the @c epoll READ flag. - Take @a ne out of the read ready list. */
| 214 | - Take @a ne out of the read ready list. |
| 215 | */ |
| 216 | static inline void |
| 217 | read_disable(NetHandler *nh, NetEvent *ne) |
| 218 | { |
| 219 | if (!ne->write.enabled) { |
| 220 | // Clear the next scheduled inactivity time, but don't clear inactivity_timeout_in, |
| 221 | // so the current timeout is used when the NetEvent is reenabled and not the default inactivity timeout |
| 222 | ne->next_inactivity_timeout_at = 0; |
| 223 | Dbg(NetHandler::dbg_ctl_socket, "read_disable updating inactivity_at %" PRId64 ", NetEvent=%p", ne->next_inactivity_timeout_at, |
| 224 | ne); |
| 225 | } |
| 226 | ne->read.enabled = 0; |
| 227 | nh->read_ready_list.remove(ne); |
| 228 | ne->ep.modify(-EVENTIO_READ); |
| 229 | } |
| 230 | |
| 231 | /** Disable writing on the NetEvent @a ne. |
| 232 | @param nh Nethandler that owns @a ne. |
no test coverage detected