| 210 | } |
| 211 | |
| 212 | VIO * |
| 213 | UnixNetVConnection::do_io_read(Continuation *c, int64_t nbytes, MIOBuffer *buf) |
| 214 | { |
| 215 | if (closed && !(c == nullptr && nbytes == 0 && buf == nullptr)) { |
| 216 | Error("do_io_read invoked on closed vc %p, cont %p, nbytes %" PRId64 ", buf %p", this, c, nbytes, buf); |
| 217 | return nullptr; |
| 218 | } |
| 219 | read.vio.op = VIO::READ; |
| 220 | read.vio.mutex = c ? c->mutex : this->mutex; |
| 221 | read.vio.cont = c; |
| 222 | read.vio.nbytes = nbytes; |
| 223 | read.vio.ndone = 0; |
| 224 | read.vio.vc_server = this; |
| 225 | if (buf) { |
| 226 | read.vio.set_writer(buf); |
| 227 | if (!read.enabled) { |
| 228 | read.vio.reenable(); |
| 229 | } |
| 230 | } else { |
| 231 | read.vio.buffer.clear(); |
| 232 | read.enabled = 0; |
| 233 | } |
| 234 | return &read.vio; |
| 235 | } |
| 236 | |
| 237 | VIO * |
| 238 | UnixNetVConnection::do_io_write(Continuation *c, int64_t nbytes, IOBufferReader *reader, bool owner) |
nothing calls this directly
no test coverage detected