diff --git a/userspace/falco/grpc_context.h b/userspace/falco/grpc_context.h index 22784790..b77653d9 100644 --- a/userspace/falco/grpc_context.h +++ b/userspace/falco/grpc_context.h @@ -63,5 +63,24 @@ public: mutable bool m_has_more = false; }; +class bidi_context : public context +{ +public: + bidi_context(::grpc::ServerContext* ctx): + context(ctx){}; + ~bidi_context() = default; + + enum : char + { + WAIT_CONNECT = 1, + READY_TO_WRITE, + WAIT_WRITE_DONE, + FINISHED, + } m_status = WAIT_CONNECT; + + mutable void* m_stream = nullptr; // todo(fntlnz, leodido) > useful in the future + mutable bool m_has_more = false; // fixme > needed? +}; + } // namespace grpc } // namespace falco