void HTTPSession::onLastByteEvent(
    HTTPTransaction* txn, uint64_t eomOffset, bool eomTracked) noexcept {
  if (!sock_->isEorTrackingEnabled() || !eomTracked) {
    return;
  }

  if (eomOffset != sock_->getAppBytesWritten()) {
    VLOG(2) << "tracking ack to last app byte " << eomOffset
        << " while " << sock_->getAppBytesWritten()
        << " app bytes have already been written";
    return;
  }

  VLOG(5) << "tracking raw last byte " << sock_->getRawBytesWritten()
          << " while the app last byte is " << eomOffset;

  byteEventTracker_->addAckByteEvent(sock_->getRawBytesWritten(), txn);
}
void HTTPSession::onLastByteEvent(
    HTTPTransaction* txn, uint64_t eomOffset, bool eomTracked) noexcept {
  if (!sock_->isEorTrackingEnabled() || !eomTracked) {
    return;
  }

  if (eomOffset != sock_->getAppBytesWritten()) {
    VLOG(2) << "tracking ack to last app byte " << eomOffset
        << " while " << sock_->getAppBytesWritten()
        << " app bytes have already been written";
    return;
  }

  VLOG(5) << "tracking raw last byte " << sock_->getRawBytesWritten()
          << " while the app last byte is " << eomOffset;

  byteEventTracker_->addAckByteEvent(sock_->getRawBytesWritten(), txn);
}