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

Method do_io_write

src/api/InkVConnInternal.cc:92–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90}
91
92VIO *
93INKVConnInternal::do_io_write(Continuation *c, int64_t nbytes, IOBufferReader *buf, bool owner)
94{
95 ink_assert(!owner);
96 m_write_vio.op = VIO::WRITE;
97 m_write_vio.set_continuation(c);
98 m_write_vio.nbytes = nbytes;
99 m_write_vio.ndone = 0;
100 m_write_vio.vc_server = this;
101
102 if (buf) {
103 m_write_vio.set_reader(buf);
104 if (m_write_vio.get_reader()->read_avail() > 0) {
105 if (ink_atomic_increment((int *)&m_event_count, 1) < 0) {
106 ink_assert(!"not reached");
107 }
108 eventProcessor.schedule_imm(this, ET_NET);
109 }
110 } else {
111 m_write_vio.buffer.clear();
112 }
113
114 return &m_write_vio;
115}
116
117void
118INKVConnInternal::do_io_transform(VConnection *vc)

Callers 1

TSVConnWriteFunction · 0.45

Calls 7

ink_atomic_incrementFunction · 0.85
get_readerMethod · 0.80
set_continuationMethod · 0.45
set_readerMethod · 0.45
read_availMethod · 0.45
schedule_immMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected