mirror of
https://github.com/falcosecurity/falco.git
synced 2025-08-12 11:32:39 +00:00
update(userspace/falco/grpc): for stream contexts use a flag to detect
if it is still running or not Co-Authored-By: Leonardo Di Donato <leodidonato@gmail.com> Signed-off-by: Lorenzo Fontana <lo@linux.com>
This commit is contained in:
parent
d9f2cda8cf
commit
0d194f2b40
@ -50,7 +50,7 @@ class stream_context : public context
|
|||||||
public:
|
public:
|
||||||
stream_context(::grpc::ServerContext* ctx):
|
stream_context(::grpc::ServerContext* ctx):
|
||||||
context(ctx){};
|
context(ctx){};
|
||||||
~stream_context() = default;
|
virtual ~stream_context() = default;
|
||||||
|
|
||||||
enum : char
|
enum : char
|
||||||
{
|
{
|
||||||
@ -61,35 +61,15 @@ public:
|
|||||||
|
|
||||||
mutable void* m_stream = nullptr; // todo(fntlnz, leodido) > useful in the future
|
mutable void* m_stream = nullptr; // todo(fntlnz, leodido) > useful in the future
|
||||||
mutable bool m_has_more = false;
|
mutable bool m_has_more = false;
|
||||||
|
mutable bool m_is_running = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
// 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?
|
|
||||||
// };
|
|
||||||
|
|
||||||
class bidi_context : public stream_context
|
class bidi_context : public stream_context
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
bidi_context(::grpc::ServerContext* ctx):
|
bidi_context(::grpc::ServerContext* ctx):
|
||||||
stream_context(ctx){};
|
stream_context(ctx){};
|
||||||
~bidi_context() = default;
|
virtual ~bidi_context() = default;
|
||||||
|
|
||||||
mutable bool m_wait_write_done = false;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace grpc
|
} // namespace grpc
|
||||||
|
Loading…
Reference in New Issue
Block a user