Core API teasing out WIP

This commit is contained in:
Olli Saarikivi
2023-04-22 00:35:25 +00:00
parent 9fbb0debdd
commit 0bc3c3e574
6 changed files with 516 additions and 417 deletions

39
src/include/proxy.hpp Normal file
View File

@@ -0,0 +1,39 @@
#ifndef MSCCLPP_PROXY_HPP_
#define MSCCLPP_PROXY_HPP_
#include <mscclppfifo.hpp>
#include <memory>
#include <functional>
namespace mscclpp {
enum class ProxyHandlerResult {
Continue,
FlushFifoTailAndContinue,
Stop,
};
class Proxy;
using ProxyHandler = std::function<ProxyHandlerResult(ProxyTrigger)>;
class Proxy {
public:
Proxy(ProxyHandler handler);
~Proxy();
void start();
void stop();
HostProxyFifo& fifo();
private:
struct Impl;
std::unique_ptr<Impl> pimpl;
};
} // namespace mscclpp
#endif // MSCCLPP_PROXY_HPP_