| 213 | } |
| 214 | |
| 215 | void BufferedConnection::pop(int count) { |
| 216 | while (count) { |
| 217 | int to_remove = std::min(count, BCBlock::DATA_SIZE - self->deadlist_begin_offset); |
| 218 | |
| 219 | self->deadlist_begin_offset += to_remove; |
| 220 | if (self->deadlist_begin_offset == BCBlock::DATA_SIZE) { |
| 221 | delete self->deadlist.front(); |
| 222 | self->deadlist.pop_front(); |
| 223 | self->deadlist_begin_offset = 0; |
| 224 | } |
| 225 | |
| 226 | count -= to_remove; |
| 227 | } |
| 228 | } |
| 229 | |
| 230 | void BufferedConnection::write(StringRef buf) { |
| 231 | int remaining = buf.size(); |
no outgoing calls
no test coverage detected