Send message to a worker

This commit is contained in:
2024-03-30 17:14:49 -04:00
parent 3f8bd314b6
commit e4d2076fa2

View File

@@ -166,17 +166,22 @@ int main(int argc, char **argv) {
break; break;
} }
// reply addr // reply id
zmsg_pop(msg); char *id = zmsg_popstr(msg);
// null frame // null frame
zmsg_pop(msg); zmsg_pop(msg);
struct guestfs_inpsect_command *c = guestfs_inspect_zmsg_to_command(msg); struct guestfs_inpsect_command *c = guestfs_inspect_zmsg_to_command(msg);
if (STREQ(name, c->name)) { if (STREQ(name, c->name)) {
// send request to worker
printf("name equal\n"); printf("name equal\n");
zactor_send(worker, &msg);
} else { } else {
printf("name not equal\n"); printf("name not equal\n");
} }
/* zmsg_t *reply = zmsg_recv(frontend); */
} }
zactor_destroy(&worker); zactor_destroy(&worker);