| 75 | } |
| 76 | |
| 77 | bool |
| 78 | setForWrite(TSVConn vc, TSCont contp, int64_t const bytesout) |
| 79 | { |
| 80 | TSAssert(nullptr != vc); |
| 81 | if (nullptr == m_iobuf) { |
| 82 | m_iobuf = TSIOBufferCreate(); |
| 83 | m_reader = TSIOBufferReaderAlloc(m_iobuf); |
| 84 | } else { |
| 85 | int64_t const drained = drainReader(); |
| 86 | if (0 < drained) { |
| 87 | DEBUG_LOG("Drained from reader: %" PRId64, drained); |
| 88 | } |
| 89 | } |
| 90 | m_vio = TSVConnWrite(vc, contp, m_reader, bytesout); |
| 91 | return nullptr != m_vio; |
| 92 | } |
| 93 | |
| 94 | void |
| 95 | close() |
no test coverage detected