mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Merge topic/actor-system throug a squashed commit.
This commit is contained in:
parent
7a6f5020f6
commit
fe7e1ee7f0
466 changed files with 12559 additions and 9655 deletions
|
@ -4,7 +4,7 @@
|
|||
#define EVENTHANDLER
|
||||
|
||||
#include <assert.h>
|
||||
#include <map>
|
||||
#include <unordered_set>
|
||||
#include <string>
|
||||
#include "List.h"
|
||||
#include "BroList.h"
|
||||
|
@ -22,24 +22,22 @@ public:
|
|||
|
||||
const char* Name() { return name; }
|
||||
Func* LocalHandler() { return local; }
|
||||
FuncType* FType();
|
||||
FuncType* FType(bool check_export = true);
|
||||
|
||||
void SetLocalHandler(Func* f);
|
||||
|
||||
void AddRemoteHandler(SourceID peer);
|
||||
void RemoveRemoteHandler(SourceID peer);
|
||||
|
||||
#ifdef ENABLE_BROKER
|
||||
void AutoRemote(std::string topic, int flags)
|
||||
void AutoPublish(std::string topic)
|
||||
{
|
||||
auto_remote_send[std::move(topic)] = flags;
|
||||
auto_publish.insert(std::move(topic));
|
||||
}
|
||||
|
||||
void AutoRemoteStop(const std::string& topic)
|
||||
void AutoUnpublish(const std::string& topic)
|
||||
{
|
||||
auto_remote_send.erase(topic);
|
||||
auto_publish.erase(topic);
|
||||
}
|
||||
#endif
|
||||
|
||||
void Call(val_list* vl, bool no_remote = false);
|
||||
|
||||
|
@ -81,9 +79,7 @@ private:
|
|||
typedef List(SourceID) receiver_list;
|
||||
receiver_list receivers;
|
||||
|
||||
#ifdef ENABLE_BROKER
|
||||
std::map<std::string, int> auto_remote_send; // topic -> flags
|
||||
#endif
|
||||
std::unordered_set<std::string> auto_publish;
|
||||
};
|
||||
|
||||
// Encapsulates a ptr to an event handler to overload the boolean operator.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue