MCPcopy Create free account
hub / github.com/apache/trafficserver / read_disable

Function read_disable

src/iocore/net/P_UnixNet.h:216–229  ·  view source on GitHub ↗

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. */

Source from the content-addressed store, hash-verified

214 - Take @a ne out of the read ready list.
215*/
216static inline void
217read_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.

Callers 3

net_read_ioMethod · 0.85
net_read_ioMethod · 0.85
readDisableMethod · 0.85

Calls 2

modifyMethod · 0.80
removeMethod · 0.45

Tested by

no test coverage detected