aboutsummaryrefslogtreecommitdiff
path: root/test/test_msgnet_c.c
diff options
context:
space:
mode:
authorDeterminant <[email protected]>2019-06-04 23:15:03 -0400
committerDeterminant <[email protected]>2019-06-04 23:15:03 -0400
commit14832c4ffec02b47d953a1c6d70576070ce74935 (patch)
tree03abdbb981f35dab2f91d5244e5e71990ccb837c /test/test_msgnet_c.c
parentfad6446ce15bcd1303fdd162d6938ab30046467e (diff)
the minimal example works
Diffstat (limited to 'test/test_msgnet_c.c')
-rw-r--r--test/test_msgnet_c.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/test_msgnet_c.c b/test/test_msgnet_c.c
index b717c3a..b09e375 100644
--- a/test/test_msgnet_c.c
+++ b/test/test_msgnet_c.c
@@ -132,6 +132,7 @@ MyNet gen_mynet(const eventcontext_t *ec,
res.net = msgnetwork_new(ec, netconfig);
msgnetwork_config_free(netconfig);
res.name = name;
+ return res;
};
static eventcontext_t *ec;
@@ -154,6 +155,9 @@ int main() {
msgnetwork_reg_handler(bob.net, MSG_OPCODE_HELLO, on_receive_hello);
msgnetwork_reg_handler(bob.net, MSG_OPCODE_ACK, on_receive_ack);
+ msgnetwork_reg_conn_handler(alice.net, conn_handler);
+ msgnetwork_reg_conn_handler(bob.net, conn_handler);
+
/* start all threads */
msgnetwork_start(alice.net);
msgnetwork_start(bob.net);