Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sharing common state between filters #149

Open
conqerAtapple opened this issue Mar 16, 2019 · 1 comment
Open

Sharing common state between filters #149

conqerAtapple opened this issue Mar 16, 2019 · 1 comment

Comments

@conqerAtapple
Copy link

Hello Wanglers
If I had to share some common state between filters in the Pipeline what is the recommended way to do this? Say, the first filter unwraps a network packet which contains header with information about the entire connection duration that can be shared between different filters, how do I extract this information/header in one filter and populate a map or something that can be used by other filters.

thanks

@graphcareful
Copy link

Yes I would like to know the same thing. In more then one place in the documentation the following is stated:

When events are called, a Context* object is passed to the Handler - this means state can be stored in the context object, and a single instantiation of any individual Handler can be used for the entire program.

, however a concrete example is never shown.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants