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

Function write_disable

src/iocore/net/P_UnixNet.h:240–253  ·  view source on GitHub ↗

Disable writing on the NetEvent @a ne. @param nh Nethandler that owns @a ne. @param ne The @c NetEvent to modify. - If read is already disable, also disable the inactivity timeout. - clear write enabled flag. - Remove the @c epoll WRITE flag. - Take @a ne out of the write ready list. */

Source from the content-addressed store, hash-verified

238 - Take @a ne out of the write ready list.
239*/
240static inline void
241write_disable(NetHandler *nh, NetEvent *ne)
242{
243 if (!ne->read.enabled) {
244 // Clear the next scheduled inactivity time, but don't clear inactivity_timeout_in,
245 // so the current timeout is used when the NetEvent is reenabled and not the default inactivity timeout
246 ne->next_inactivity_timeout_at = 0;
247 Dbg(NetHandler::dbg_ctl_socket, "write_disable updating inactivity_at %" PRId64 ", NetEvent=%p", ne->next_inactivity_timeout_at,
248 ne);
249 }
250 ne->write.enabled = 0;
251 nh->write_ready_list.remove(ne);
252 ne->ep.modify(-EVENTIO_WRITE);
253}

Callers 1

net_write_ioMethod · 0.85

Calls 2

modifyMethod · 0.80
removeMethod · 0.45

Tested by

no test coverage detected