TCP: Allow to get written image count
This commit is contained in:
@@ -168,16 +168,11 @@ bool TCPStreamPusher::SendCalibration(const CompressedImage &message) {
|
||||
return socket[0]->Send(serialization_buffer.data(), serializer.GetBufferSize(), TCPFrameType::CALIBRATION);
|
||||
}
|
||||
|
||||
std::optional<ImagePusherAckProgress> TCPStreamPusher::GetAckProgress() const {
|
||||
ImagePusherAckProgress out{
|
||||
};
|
||||
std::optional<uint64_t> TCPStreamPusher::GetImagesWritten() const {
|
||||
uint64_t ret = 0;
|
||||
for (const auto &s : socket) {
|
||||
auto p = s->GetDataAckProgress();
|
||||
out.data_sent += p.data_sent;
|
||||
out.data_acked_ok += p.data_acked_ok;
|
||||
out.data_acked_bad += p.data_acked_bad;
|
||||
out.data_acked_total += p.data_acked_total;
|
||||
out.data_ack_pending += p.data_ack_pending;
|
||||
ret += p.data_acked_ok;
|
||||
}
|
||||
return out;
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user