zeek/testing/btest/scripts/base/protocols/conn/polling.test
Robin Sommer 789cb376fd GH-239: Rename bro to zeek, bro-config to zeek-config, and bro-path-dev to zeek-path-dev.
This also installs symlinks from "zeek" and "bro-config" to a wrapper
script that prints a deprecation warning.

The btests pass, but this is still WIP. broctl renaming is still
missing.

#239
2019-05-01 21:43:45 +00:00

20 lines
520 B
Text

# @TEST-EXEC: zeek -b -r $TRACES/http/100-continue.trace %INPUT >out1
# @TEST-EXEC: btest-diff out1
# @TEST-EXEC: zeek -b -r $TRACES/http/100-continue.trace %INPUT stop_cnt=2 >out2
# @TEST-EXEC: btest-diff out2
@load base/protocols/conn
const stop_cnt = 10 &redef;
function callback(c: connection, cnt: count): interval
{
print "callback", c$id, cnt;
return cnt >= stop_cnt ? -1 sec : .2 sec;
}
event new_connection(c: connection)
{
print "new_connection", c$id;
ConnPolling::watch(c, callback, 0, 0secs);
}