> case type Broker::Data as d:
> print "Broker::Data, expected to be nil", d?$data, d?$data ?
> cat(d$data) : "nil";
> # or use the same logic from the is_nil() function above
This is the logic I was looking for, thanks! The generic is_nil
function might come in handy some othe
On Tue, Sep 11, 2018 at 5:52 AM Matthias Vallentin wrote:
> One more question: how would I capture a default-constructed
> broker::Data() in a case statement? This would happen when I publish
> just "None" on the Python side. In Bro, it shows up on the command
> line as "broker::data{nil}".
Ther
> This, plus a couple other bugs should now be fixed in bro + broker, so
make sure to update both if trying the above examples.
Great, it works now!
One more question: how would I capture a default-constructed
broker::Data() in a case statement? This would happen when I publish
just "None" on the
On Mon, Sep 10, 2018 at 8:01 AM Matthias Vallentin wrote:
>
> I'm trying to figure out if/how it is possible to use Broker::Data in an
> event handler as follows:
>
> event foo(x: Broker::Data)
> {
> print x;
> }
No, but you can try to use 'any' instead of 'Broker::Data'. E
I'm trying to figure out if/how it is possible to use Broker::Data in an
event handler as follows:
event foo(x: Broker::Data)
{
print x;
}
I'm trying to send an event via the Python bindings:
event = broker.bro.Event("foo", broker.Data(42))
endpoint.publish("/test"