| 196 | } |
| 197 | |
| 198 | void THttpTransport::shift() { |
| 199 | if (httpBufLen_ > httpPos_) { |
| 200 | // Shift down remaining data and read more |
| 201 | uint32_t length = httpBufLen_ - httpPos_; |
| 202 | memmove(httpBuf_, httpBuf_ + httpPos_, length); |
| 203 | httpBufLen_ = length; |
| 204 | } else { |
| 205 | httpBufLen_ = 0; |
| 206 | } |
| 207 | httpPos_ = 0; |
| 208 | httpBuf_[httpBufLen_] = '\0'; |
| 209 | } |
| 210 | |
| 211 | void THttpTransport::refill() { |
| 212 | uint32_t avail = httpBufSize_ - httpBufLen_; |