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

Method do_io_write

src/iocore/net/UnixNetVConnection.cc:237–260  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

235}
236
237VIO *
238UnixNetVConnection::do_io_write(Continuation *c, int64_t nbytes, IOBufferReader *reader, bool owner)
239{
240 if (closed && !(c == nullptr && nbytes == 0 && reader == nullptr)) {
241 Error("do_io_write invoked on closed vc %p, cont %p, nbytes %" PRId64 ", reader %p", this, c, nbytes, reader);
242 return nullptr;
243 }
244 write.vio.op = VIO::WRITE;
245 write.vio.mutex = c ? c->mutex : this->mutex;
246 write.vio.cont = c;
247 write.vio.nbytes = nbytes;
248 write.vio.ndone = 0;
249 write.vio.vc_server = this;
250 if (reader) {
251 ink_assert(!owner);
252 write.vio.set_reader(reader);
253 if (nbytes && !write.enabled) {
254 write.vio.reenable();
255 }
256 } else {
257 write.enabled = 0;
258 }
259 return &write.vio;
260}
261
262void
263UnixNetVConnection::do_io_close(int alerrno /* = -1 */)

Callers

nothing calls this directly

Calls 3

ErrorClass · 0.50
set_readerMethod · 0.45
reenableMethod · 0.45

Tested by

no test coverage detected