kou commented on issue #37429:
URL: https://github.com/apache/arrow/issues/37429#issuecomment-1698359694
How about calling `arrow::ipc::StreamDecoder::Reset()` in a listener?
```cpp
class EndlessListener : public arrow::ipc::Listener {
public:
explicit EndlessListener() : arrow::ipc::Listener(), decoders_() {}
arrow::Status OnEOS() override {
for (auto decoder : decoders_) {
ARROW_RETURN_NOT_OK(decoder->Reset());
}
return arrow::Status::OK();
}
void AddDecoder(arrow::ipc::StreamDecoder *decoder) {
decoders_.push_back(decoder);
}
private:
std::vector<arrow::ipc::StreamDecoder> decoders_;
};
auto listener = std::make_shared<EndlessListener>();
arrow::ipc::StreamDecoder decoder (listener);
listener->AddDecoder(*decoder);
decoder.Consume(...);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]