-int main(int argc, char *argv[]) {
- meshlink_set_log_cb(NULL, MESHLINK_DEBUG, log_cb);
-
- // Open two new meshlink instance.
-
- meshlink_handle_t *mesh1 = meshlink_open("channels_conf.1", "foo", "channels", DEV_CLASS_BACKBONE);
- if(!mesh1) {
- fprintf(stderr, "Could not initialize configuration for foo\n");
- return 1;
- }
+static bool accept_cb(meshlink_handle_t *mesh, meshlink_channel_t *channel, uint16_t port, const void *data, size_t len) {
+ printf("accept_cb: (from %s on port %u) ", channel->node->name, (unsigned int)port);