aboutsummaryrefslogtreecommitdiff
path: root/test/bench_network.cpp
diff options
context:
space:
mode:
authorDeterminant <[email protected]>2019-10-13 14:05:29 -0400
committerDeterminant <[email protected]>2019-10-13 14:05:29 -0400
commit3505e9d33eab6d341185773c1da315b2dc833a21 (patch)
treea67629fea47ee83f5c05d781198469f135882eeb /test/bench_network.cpp
parent8270af53b2e4741fcacab49a21823597cc31d88c (diff)
WIP: bounded recv buffer
Diffstat (limited to 'test/bench_network.cpp')
-rw-r--r--test/bench_network.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/bench_network.cpp b/test/bench_network.cpp
index 1021ec4..1d52c39 100644
--- a/test/bench_network.cpp
+++ b/test/bench_network.cpp
@@ -130,6 +130,13 @@ salticidae::EventContext ec;
NetAddr alice_addr("127.0.0.1:1234");
NetAddr bob_addr("127.0.0.1:1235");
+void masksigs() {
+ sigset_t mask;
+ sigemptyset(&mask);
+ sigfillset(&mask);
+ pthread_sigmask(SIG_BLOCK, &mask, NULL);
+}
+
int main() {
salticidae::BoxObj<MyNet> alice = new MyNet(ec, "Alice", 10);
alice->start();
@@ -137,6 +144,7 @@ int main() {
salticidae::EventContext tec;
MyNet bob(tec, "Bob");
std::thread bob_thread([&]() {
+ masksigs();
bob.start();
bob.connect(alice_addr);
tec.dispatch();